Redirection
How does it work?
Example
private void Start()
{
// This is called on every client when they join!
NetworkManager.Singleton.OnClientStarted += () =>
{
// Normally sending a message to everyone is only a thing for the server to do!
// Let's say hello to everyone when we join!
Messenger.ToAll(HelloMessage);
};
}
[Message(allowRedirect:true)]
private void HelloMessage(ulong senderId)
{
Debug.Log($"{senderId} says hello!");
}Last updated