Пример #1
0
        void Awake()
        {
            originalObject.AddComponent<AwakeDetector>();

            if (_instance == null)
            {
                _instance = this;

                AwakeDetector.OnAwake += (g) => GameObjectCloned(g);
            }
            else
            {
                Destroy(this.gameObject);
            }
        }
Пример #2
0
        void Awake()
        {
            originalObject.AddComponent <AwakeDetector>();

            if (_instance == null)
            {
                _instance = this;

                AwakeDetector.OnAwake += (g) => GameObjectCloned(g);
            }
            else
            {
                Destroy(this.gameObject);
            }
        }