protected override void Awake() { base.Awake(); debrisPool = new Queue <DebrisController>(); instance = this; AllocPool(); }
static DebrisPool DebrisPoolObjCache = null; // object cache public static DebrisPool DebrisPoolAsset() { if (DebrisPoolObjCache == null) { DebrisPoolObjCache = Resources.Load <DebrisPool>("Managers/DebrisPool"); } return(DebrisPoolObjCache); } // end method DebrisPoolAsset