Closed hyperbting closed 1 month ago
The scripts created by the templates are not intended to align with any particular example. They're just a convenient foundation for you to start from and you can mod them however you see fit to suit your game. In some cases, invoking the Action after the base method call may be appropriate, others it may not.
Describe the bug two things, one is the Callbacks order not as described in website observing
OnServerAddPlayer
triggered earlier thanOnStartServer
I just put Debug.Log on public override void OnStartServer() at any NetworkBehavior and OnServerDisconnectAction of a NewNetworkManagerWithActions created from scripttemplatesanother thing is redoing the ResetPlayerNumbers() from Example/Basic with NewNetworkManagerWithActions, the result is different to example
[IMPORTANT] How can we reproduce the issue, step by step:
comparing to the example/basic BasicNetManager.cs https://github.com/MirrorNetworking/Mirror/blob/master/Assets/Mirror/Examples/Basic/Scripts/BasicNetManager.cs#L16 and https://github.com/MirrorNetworking/Mirror/blob/master/Assets/ScriptTemplates/51-Mirror__Network%20Manager%20With%20Actions-NewNetworkManagerWithActions.cs.txt#L217
the Invoke thing in BasicNetManager is after the base.OnServerAddPlayer(conn); if we move
Player.ResetPlayerNumbers();
beforebase.OnServerAddPlayer(conn);
the ResetPlayerNumbers() will find one less playerall Invoke() in NewNetworkManagerWithActions should after base.ooo(), maybe
Expected behavior using NewNetworkManagerWithActions should be the same to BasicNetManager /NetworkManager without Actions
Desktop (please complete the following information):
Additional context Add any other context about the problem here.