private List <NGUIWidgetInfo> GetWidgetInfoListByShowType(NGUIPrefabInfo info, ShowType type) { var list = new List <NGUIWidgetInfo>(); switch (type) { case ShowType.Empty: { break; } case ShowType.All: { list.AddRange(info.WidgetList); break; } case ShowType.EmptySprite: { list.AddRange(info.GetUISpriteEmptyList()); break; } case ShowType.EmptyLabel: { list.AddRange(info.GetUILabelEmptyList()); break; } case ShowType.WrongLabelDepth: { list.AddRange(info.GetUILabelNotSatisfiedDepthList(CommonLabelDepth)); break; } case ShowType.SameDepthCombineDrawCallFail: { list.AddRange(info.GetSameDepthCannotCombineDrawCall()); break; } } return(list); }
private void RightTopPanel() { EnumPopup <ShowType>("当前显示(不可修改)", _showType); Space(); Button("刷新", () => RefreshConfig()); Space(); Button("显示全部", () => SwitchShowType(ShowType.All)); Space(); Button("空Sprite", () => SwitchShowType(ShowType.EmptySprite)); Space(); Button("空Label", () => SwitchShowType(ShowType.EmptyLabel)); Space(); Button(string.Format("错误Label Depth({0})", CommonLabelDepth), () => SwitchShowType(ShowType.WrongLabelDepth)); Space(); Button("同Depth不能合并DrawCall", () => SwitchShowType(ShowType.SameDepthCombineDrawCallFail)); FlexibleSpace(); Space(); _objectAdded = ObjectField("场景物体:", _objectAdded, typeof(GameObject), true); if (_objectAdded != null) { var prefabType = PrefabUtility.GetPrefabType(_objectAdded); if (prefabType != PrefabType.Prefab && prefabType != PrefabType.PrefabInstance) { ShowNotification(new GUIContent(prefabType.ToString())); _objectAdded = null; } } if (_objectAdded != null && (_selectPrefabInfo == null || _selectPrefabInfo.Prefab != _objectAdded)) { _selectPrefabInfo = new NGUIPrefabInfo(_objectAdded as GameObject); } }
private void OptimizeWidgetsDepth(NGUIPrefabInfo info) { info.OptimizeWidgetsDepth(CommonLabelDepth); }
private void CompressWidgetDepth(NGUIPrefabInfo info) { info.CompressWidgetDepth(CommonLabelDepth); }
private void FixedLabelDepth(NGUIPrefabInfo info) { info.FixedLabelDepth(CommonLabelDepth); }
private void ClearSelected() { _objectAdded = null; _selectPrefabInfo = null; }