Пример #1
0
 void Awake()
 {
     // setup singleton
     if (singleton == null)
     {
         singleton = this;
     }
     else if (singleton != this)
     {
         Destroy(gameObject);
     }
 }
Пример #2
0
        public override void Init(GSData data)
        {
            base.Init(data);

            NodeObjectBuilder.Preload(this.asset, Type.Gatherable); // preload asset
        }