Changes

Jump to navigation Jump to search
2 bytes added ,  20:10, 7 February 2020
Line 18: Line 18:     
Start by creating a class that implements the ModMeta abstract class, then implement as many classes that inherit from ModBehaviour as you want.
 
Start by creating a class that implements the ModMeta abstract class, then implement as many classes that inherit from ModBehaviour as you want.
 +
 
The ModMeta class will contain information about your mod and act as a manager for your mod.
 
The ModMeta class will contain information about your mod and act as a manager for your mod.
 +
 
ModBehaviours are just a subclass to Unity's [https://docs.unity3d.com/2017.4/Documentation/ScriptReference/MonoBehaviour.html MonoBehavior] and work the same way, i.e. they use the same life cycle of Awake, Start, Update, OnDestroy. You should stick to the Update method, rather than trying to write your own update loop, as you cannot interact with Unity's system from other threads. Each ModBehaviour implementation will be instantiated once the mod is loaded.
 
ModBehaviours are just a subclass to Unity's [https://docs.unity3d.com/2017.4/Documentation/ScriptReference/MonoBehaviour.html MonoBehavior] and work the same way, i.e. they use the same life cycle of Awake, Start, Update, OnDestroy. You should stick to the Update method, rather than trying to write your own update loop, as you cannot interact with Unity's system from other threads. Each ModBehaviour implementation will be instantiated once the mod is loaded.
  

Navigation menu