NetworkBehaviour
, you can write your own implementation of what should happen when these events occur. To do this, you override the virtual methods on the NetworkBehaviour
class with your own implementation of what should happen when the given event occurs.NetworkBehaviour
, and where they are calledbase.OnSerialize
ObjectDestroyMessage
or ObjectHideMessage
messagesNOTE:Start
is called by unity before the first frame, while normally this happens after Mirror's callbacks. But if you dont callNetworkServer.Spawn
the same frame asinstantiate
then start may be called first
Note:OnRebuildObservers
andOnSetHostVisibility
is now onNetworkVisibility
instead ofNetworkBehaviour
OnStartServer
OnRebuildObservers
Start
OnStartAuthority
OnStartClient
OnStartLocalPlayer
Start
OnStartServer
OnRebuildObservers
OnStartAuthority
OnStartClient
OnSetHostVisibility
OnStartLocalPlayer
Start