예제 #1
0
        // Use this for initialization
        void Start()
        {
            if (InitData != null)
            {
                for (int cnt = 0; cnt < InitData.Count; cnt++)
                {
                    RFObjectPoolInitData opid = InitData[cnt];
                    // Only allow "properly" filled out objects to be spawned
                    if (opid != null && opid.SourcePrefab != null)
                    {
                        RFObjectPool.Preload(opid.SourcePrefab, opid.ObjectPoolID, opid.StartCount, opid.TargetSpawnParent);
                    }
                }
            }

            isReady = true;
        }
예제 #2
0
 void OnDestroy()
 {
     RFObjectPool.ClearAll();
 }