public static Component GetComponentInChildren(GameObject tarObj, Type findType) { if (tarObj == null) { return(null); } return(NsEffectManager.GetComponentInChildren(tarObj, findType, new List <GameObject> { tarObj })); }
bool CheckNotSupportComponent(GameObject targetObj, System.Type comType) { FxmInfoIndexing infoIndexingCom = null; Component findCom; string comName = ""; findCom = NsEffectManager.GetComponentInChildren(targetObj, comType); if (findCom != null) { string subString = "UnityEngine."; comName = findCom.ToString(); if (comName.Contains(subString)) { comName = comName.Replace(subString, ""); } infoIndexingCom = findCom.GetComponent <FxmInfoIndexing>(); } if (findCom is ParticleEmitter) { if (IsParticleEmitterOneShot(findCom as ParticleEmitter)) { if (infoIndexingCom != null) { NcParticleSystem ncParticleSystem = infoIndexingCom.m_OriginalTrans.GetComponent <NcParticleSystem>(); FXMakerHierarchy.inst.SetActiveComponent(infoIndexingCom.m_OriginalTrans.gameObject, ncParticleSystem, true); if (ncParticleSystem == null) { FxmPopupManager.inst.ShowWarningMessage("- Replay Error!!! : Used the ParticleEmitter.OneShot." + comName + ".\nYou must change this to NcParticleSystem.bBurst. First, add NcParticleSystem.", 5); } else { FxmPopupManager.inst.ShowWarningMessage("- Replay Error!!! : Used the ParticleEmitter.OneShot." + comName + ".\nYou must change this to NcParticleSystem.bBurst. Please click button(Inspector - 'Convert: OneShot To FXMakerBurst')", 5); } } } } else if (findCom != null) { FxmPopupManager.inst.ShowToolMessage(" - Replay Error!!! : " + comName + " is included.\nThis component does not support the replay.", 5); return(false); } return(true); }
protected static Component GetValidComponentInChildren(GameObject tarObj, Type findType, List <GameObject> parentPrefabList, bool bCheckDup) { if (!parentPrefabList.Contains(tarObj)) { parentPrefabList.Add(tarObj); Component componentInChildren = NsEffectManager.GetComponentInChildren(tarObj, findType, parentPrefabList); parentPrefabList.Remove(tarObj); return(componentInChildren); } if (bCheckDup) { string text = string.Empty; for (int i = 0; i < parentPrefabList.Count; i++) { text = text + parentPrefabList[i].name + "/"; } Debug.LogWarning("LoadError : Recursive Prefab - " + text + tarObj.name); return(null); } return(null); }
bool CheckNotSupportComponent(GameObject targetObj, System.Type comType) { FxmInfoIndexing infoIndexingCom = null; Component findCom; string comName = ""; findCom = NsEffectManager.GetComponentInChildren(targetObj, comType); if (findCom != null) { string subString = "UnityEngine."; comName = findCom.ToString(); if (comName.Contains(subString)) { comName = comName.Replace(subString, ""); } infoIndexingCom = findCom.GetComponent <FxmInfoIndexing>(); } if (findCom != null) { FxmPopupManager.inst.ShowToolMessage(" - Replay Error!!! : " + comName + " is included.\nThis component does not support the replay.", 5); return(false); } return(true); }