void OnEnable() { thisTarget = serializedObject.targetObject as FxLOD; thisTarget.particleSystems = thisTarget.GetComponentsInChildren<ParticleSystem>(); UpdateInfos(); }
static bool IsLodPrioritiesSetted(FxLOD lod) { foreach (var p in lod.priorities) { if (p != 0) return true; } return false; }
public IEnumerable DoCheckFxLOD(string prefabName, GameObject sfxPrefab) { FxLOD lod = sfxPrefab.GetComponent <FxLOD>(); if (lod != null) { bool missing = false; GameObject[] objs = lod.allKeyGameObjects; for (int i = 0; i < objs.Length; ++i) { if (objs[i] == null) { missing = true; } } if (missing) { _ErrorString += string.Format("特效包含FOD,但allKeyGameObjects中有GameObject为空! {0}\n", prefabName); } } yield return(null); }