示例#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>());
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     ScriptRegistry.Provide <Test>(new Test());
     print(ScriptRegistry.GetScript <Test1>());
     print(ScriptRegistry.GetScript <Test>());
 }