We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ced5e16 commit d3144cfCopy full SHA for d3144cf
Runtime/Controller.cs
@@ -21,6 +21,8 @@ public abstract class Controller : UnityEngine.MonoBehaviour, IController {
21
22
/// During the awake, this system will start the initialization.
23
private void Awake () {
24
+ if (Controller.Instance != null)
25
+ throw new System.Exception ("A project cannot exceed the limit of one controller!");
26
UnityEngine.Object.DontDestroyOnLoad (this.transform.root.gameObject);
27
Controller.Instance = this;
28
this.systems = new System.Collections.Generic.List<IEntitySystem> ();
0 commit comments