예제 #1
0
        //this is the init on each game start
        //init manualy via inspector over buttons!
        void Awake()
        {
            if (GET == null)
            {
                DontDestroyOnLoad(this.gameObject);
                GET = this;
            }
            else if (GET != this)
            {
                Destroy(this.gameObject);
            }

            //if there are components missing add them to the dict!
            SetUp();

            //create them all and add into list also initializes them
            InitSinglitons();

            AWAKE_INIT_DONE = true;
        }
예제 #2
0
 void OnEnable()
 {
     Target = (MANAGER)target;
 }