You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2022. It is now read-only.
objectCreated should be called after the AttachedBehaviour's GameObject is Setup / Passed Start() / NetworkStart(), if not, add a callback that is at this point and rename ObjectCreated - it may just be me but I assumed this should be done by the time this is called, maybe it is a naming issue. Even more ideal would be to have something in the objectCreated callback where you could access the GO without having to typecast as this would be useful!
Actual behavior:
For the Client, I found NetworkStart is called after the objectCreated callback, leading to the AttachedBehaviour to be null.
Steps to reproduce:
Attach a Host, Make a NetworkObject (e.g. NO with Behaviour NOBehaviour)
Add Debug to the NOBehaviour NetworkStart method if(NetworkBehaviour is NOBehaviour) that outputs the AttachedBehaviour to Debug
Setup callback for objectCreated on Client
Attach a Client
In the callback, using MainThread the if(NetworkBehaviour is NOBehaviour) passes but the AttachedBahaviour is null.
Note, the Debug in the NOBehaviour NetworkStart is called after