private void CreateUIEffectMeta(RectTransform control) { var index = 0; var childCount = control.childCount; while (index < childCount) { var child = control.GetChild(index); if (!child.name.StartsWith(EFFECTID_START)) { index++; continue; } var effectInfo = LegoUIEffectInfo.Create(child); if (EffectPrefabIds == null) { EffectPrefabIds = new List <LegoUIEffectInfo>(); } EffectPrefabIds.Add(effectInfo); Debug.LogError($"在物体{control.name}下发现UI特效{child.name}!"); index++; } }
public static LegoUIEffectInfo Create(Transform trm) { var effectInfo = new LegoUIEffectInfo { PrefabId = trm.name, IsActive = trm.gameObject.activeSelf }; return(effectInfo); }