Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     ScriptRegistry.Provide <Test1>(this);
     print(ScriptRegistry.GetScript <Test1>());
     this.gameObject.name = "new one";
     ScriptRegistry.Provide <Test1>(this);
     print(ScriptRegistry.GetScript <Test1>());
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     ScriptRegistry.Provide <Test>(new Test());
     print(ScriptRegistry.GetScript <Test1>());
     print(ScriptRegistry.GetScript <Test>());
 }