🚀
Netick
HomeDownloadDiscord
  • Understanding Client-Server Model
  • Core Concepts
  • Network State
  • Change Callback
  • Remote Procedure Calls (RPCs)
  • RPCs vs Properties
  • Listening to Network Events
  • Understanding Client-Side Prediction
    • Writing Client-Side Prediction code
  • Interpolation
  • Lag Compensation
  • Network Object Instantiation and Destruction
    • Network Prefab Pool
  • Parenting
  • Managing Netick
  • Script Execution Order
Powered by GitBook
On this page

Was this helpful?

Script Execution Order

The network methods on your Network Behavior classes are called from inside Netick, which means standard Unity MonoBehaviour script order control does not work here. To specify the order of execution for classes inheriting from Network Behavior, use the attributes:

[ExecuteAfter(typeof(SomeOtherScript))]  /* to specify that this script executes after SomeOtherScript) */
[ExecuteBefore(typeof(SomeOtherScript))] /* to specify that this script executes before SomeOtherScript */

Example:

 [ExecuteAfter(typeof(SomeOtherScript))]
 public class BomberController : NetworkBehaviour 
 {
      // ... 
 }
PreviousManaging Netick

Last updated 1 year ago

Was this helpful?