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