Authentication
In PurrNet, custom authenticators enable you to define your own authentication logic for multiplayer games. This guide will walk you through the steps to create a custom authenticator using a simple password-based example.
1. Create a script for your Authenticator
Create a new C# script in your Unity project, and name it something meaningful, such as CustomAuthenticator
.
2. Implement the Custom Authenticator Class
Your custom authenticator class should inherit from AuthenticationBehaviour<T>
. This ensures that your class adheres to the PurrNet authentication structure.
3. Using the Custom Authenticator
To use your custom authenticator add it somewhere on your scene as a component and link it to your network manager like so:
Congratulations! You've successfully created a custom authenticator in PurrNet. This allows you to control access to your multiplayer game more securely and flexibly. Experiment with different types of authenticators and tailor them to fit your specific requirements.
Last updated