NetworkBehaviour and MonoBehaviour script execution order

Hi

I am creating a multiplayer game in which the objects derived from MonoBehaviour are simulated the same way on the clients. I observed a problem however that the execution order of NetworkBehaviour objects interleaves with MonoBehaviour objects differently in different clients. Is this possible to happen and how can I rectify this ?

You can edit the Script Execution Order. I haven’t tested, how this interacts with NetworkBehaviours, but they should, in theory, behave just like MonoBehaviours.

How can I change script execution order for objects instantiated using the same script ?

I don’t think that is possible. I guess it is controlled by the order in which the objects are created, but I don’t relly know.

If you have code, that relies on other code being executed before, you can use LateUpdate(), although this doesn’t solve interdependencies between objects using the same MonoBehaviour. You would probably have to resolve this via other means, like static variables or (I feel dirty for recommending this) a Singleton.