void RecursionFX(Transform tf) { int count = tf.childCount; Transform t = null; for (int i = 0; i < count; ++i) { t = tf.GetChild(i); if (t.name.IndexOf("FX_") != -1 || t.name.IndexOf("fx_") != -1) { FxData fxData = new FxData(); fxData._count = 1; fxData._name = t.name; fxData._transform = t; //string strTemp = "Assets/Resources/ResourcesInGame/fx/" + path + ".prefab"; //fxData._prefab = AssetDatabase.LoadAssetAtPath(strTemp, typeof(GameObject)); _fxData.Add(fxData); } RecursionFX(t); t = null; } }
void IPool.OnRelease() { ID = 0; PoolMgr.singleton.ReleaseCsharpObject(Data); Data = null; }
void IPool.OnGet(params object[] args) { Data = args[0] as FxData; ID = FxMgr.singleton.FxID; }