public GameObject PlayEffect(string eff, float destroyTime) { GameObject obj = null; if (!string.IsNullOrEmpty(eff) && eff != "null") { try { obj = EffectMgr.LoadAsyn(eff, owner); Effect e = DataMgr.GetEffect(eff); if (e != null) { if (e.time > 0f) { DestroyEff(obj, e.time); } } else { if (destroyTime > 0) { DestroyEff(obj, destroyTime); } else { DestroyEff(obj, 5f); } } } catch (UnityException e) { Debug.LogException(e); } } return(obj); }