public virtual bool ShowSelectMeshPopupWindow(Object selObj) { m_SelectMeshComponent = selObj as Component; m_OldSelectMesh = NgSerialized.GetMesh(m_SelectMeshComponent, true) as Mesh; m_CaptionName = "Select Mesh"; m_PrefsName = "SelectMesh"; SetShowOption(m_SelectMeshComponent.transform, DIALOG_TYPE.SELECT, true); return(base.ShowPopupWindow(m_SelectMeshComponent.transform, false)); }
public virtual bool ShowSelectMeshPopupWindow(Object selObj) { m_LoadPrefabType = NgEnum.PREFAB_TYPE.All; m_SelectMeshComponent = selObj as Component; m_OldSelectMesh = NgSerialized.GetMesh(m_SelectMeshComponent, true) as Mesh; m_CaptionName = "Select Mesh - " + m_LoadPrefabType.ToString(); m_PrefsName = "SelectMesh"; SetShowOption(m_SelectMeshComponent.transform, DIALOG_TYPE.SELECT, true); return base.ShowPopupWindow(m_SelectMeshComponent.transform, false); }
void RemoveInvaildComponent(GameObject gameObj) { // MeshParticleEmitter - missing mesh - unity error ParticleEmitter[] pes = gameObj.GetComponentsInChildren <ParticleEmitter>(true); foreach (ParticleEmitter pe in pes) { if (NgSerialized.IsMeshParticleEmitter(pe as ParticleEmitter) && NgSerialized.GetMesh(pe, false) == null) { // Debug.Log(pe.name + " - MeshParticleEmitter : missing mesh"); if (pe.gameObject.renderer != null) { DestroyImmediate(pe.gameObject.renderer); } DestroyImmediate(pe); } } // remove Dup Component - Over process error Transform[] transComs = gameObj.GetComponentsInChildren <Transform>(true); foreach (Transform trans in transComs) { NcEffectBehaviour[] effComs = trans.GetComponents <NcEffectBehaviour>(); foreach (NcEffectBehaviour eff in effComs) { if (eff != null && eff.CheckProperty() == "SCRIPT_WARRING_DUPLICATE") { Component[] dupcoms = eff.GetComponents(eff.GetType()); for (int n = 0; n < dupcoms.Length; n++) { if (0 < n) { DestroyImmediate(dupcoms[n]); } } } } } // remove DisableComponent - AutoRet error NcEffectBehaviour[] effDComs = gameObj.GetComponentsInChildren <NcEffectBehaviour>(true); for (int n = 0; n < effDComs.Length; n++) { if (effDComs[n].enabled == false) { DestroyImmediate(effDComs[n]); } } }