public override void Draw() { foldout = EditorGUILayout.Foldout(foldout, FOLD_NAME); if (!foldout) { return; } HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo(INFO); this.enabled = HierarchyUtil.Toggle("Enabeld", this.enabled, @"Enable/Disable all features from this section"); HierarchyUtil.BeginHorizontal(() => { this.prefix = HierarchyUtil.TextField("Prefix", this.prefix, @"Prefix string for separator in GameObject's name"); HierarchyUtil.Button("Reset", ResetPrefix); }); HierarchyUtil.BeginHorizontal(() => { this.color = HierarchyUtil.ColorField("Color", this.color, @"Color of the separator"); HierarchyUtil.Button("Reset", ResetColor); }); this.drawFill = HierarchyUtil.Toggle("Draw Fill", this.drawFill, @"Draw separator from start all the way to the end"); }); }
public override void Draw() { foldout = EditorGUILayout.Foldout(foldout, FOLD_NAME); if (!foldout) { return; } HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo(INFO); this.enabled = HierarchyUtil.Toggle("Enabeld", this.enabled, @"Enable/Disable all features from this section"); this.focus = HierarchyUtil.Toggle("Folding", this.focus, @"Focus the component after clicking the icon"); HierarchyUtil.BeginHorizontal(() => { this.disableAlpa = HierarchyUtil.Slider("Disable Alpha", this.disableAlpa, 0.1f, 0.9f, @"Alpha for disabled components"); HierarchyUtil.Button("Reset", ResetDisableAlpha); }); }); }
public override void Draw() { foldout = EditorGUILayout.Foldout(foldout, FOLD_NAME); if (!foldout) { return; } HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo(INFO); this.enabled = HierarchyUtil.Toggle("Enabeld", this.enabled, @"Enable/Disable all features from this section"); HierarchyUtil.BeginHorizontal(() => { this.color = HierarchyUtil.ColorField("Color", this.color, @"Color for odd row"); HierarchyUtil.Button("Reset", ResetColor); }); this.drawFill = HierarchyUtil.Toggle("Draw Fill", this.drawFill, @"Draw the row entirely to the left"); }); }
public override void Draw() { foldout = EditorGUILayout.Foldout(foldout, FOLD_NAME); if (!foldout) { return; } HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo(INFO); this.enabled = HierarchyUtil.Toggle("Enabeld", this.enabled, @"Enable/Disable all features from this section"); HierarchyUtil.LabelField("Hide Flags"); HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo(@"Hide specific log level"); this.hideLog = HierarchyUtil.Toggle("Hide Log", this.hideLog, @"Hide log"); this.hideWarning = HierarchyUtil.Toggle("Hide Warning", this.hideWarning, @"Hide warning"); this.hideError = HierarchyUtil.Toggle("Hide Error", this.hideError, @"Hide error"); }); }); }
/* Setter & Getter */ /* Functions */ public override void OnInspectorGUI() { HierarchyUtil.CreateInfo(INFO); this.mTarget = (HierarchyControlPanel)this.target; EditorGUI.BeginChangeCheck(); DrawOption(HierarchyData.f_alterRowShading, ref mTarget.f_alterRowShading, "Alternate Row Shading", @"Enable feature Alternate Row Shading"); DrawOption(HierarchyData.f_separator, ref mTarget.f_separator, "Separator", @"Enable feature Separator"); DrawOption(HierarchyData.f_tree, ref mTarget.f_tree, "Tree", @"Enable feature Tree"); DrawOption(HierarchyData.f_log, ref mTarget.f_log, "Logs", @"Enable feature Logs"); DrawOption(HierarchyData.f_icons, ref mTarget.f_icons, "Icons", @"Enable feature Icons"); DrawOption(HierarchyData.f_components, ref mTarget.f_components, "Components", @"Enable feature Components"); DrawOption(HierarchyData.f_tag, ref mTarget.f_tag, "Tag", @"Enable feature Tag"); DrawOption(HierarchyData.f_layer, ref mTarget.f_layer, "Layer", @"Enable feature Layer"); DrawOption(HierarchyData.f_instanceID, ref mTarget.f_instanceID, "Instance ID", @"Enable feature Instance ID"); if (EditorGUI.EndChangeCheck()) { EditorUtility.SetDirty(mTarget); } }
public override void Draw() { foldout = EditorGUILayout.Foldout(foldout, FOLD_NAME); if (!foldout) { return; } HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo(INFO); this.enabled = HierarchyUtil.Toggle("Enabeld", this.enabled, @"Enable/Disable all features from this section"); this.guess = HierarchyUtil.Toggle("Guess", this.guess, @"Guess the icon by the name of the GameObject"); this.omitComp = HierarchyUtil.Toggle("Omit Component", this.omitComp, @"Omit guessed component"); }); }
public override void Draw() { foldout = EditorGUILayout.Foldout(foldout, FOLD_NAME); if (!foldout) { return; } HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo(INFO); this.enabled = HierarchyUtil.Toggle("Enabeld", this.enabled, @"Enable/Disable all features from this section"); HierarchyUtil.LabelField("Bar"); HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo("Colorized Bar by tree level"); this.colorizedLine = HierarchyUtil.Toggle("Colorized Line", this.colorizedLine, @"Enabled/Disabled to colorized bar"); HierarchyUtil.BeginHorizontal(() => { this.lineAlpha = HierarchyUtil.Slider("Line Alpha", this.lineAlpha, 0.0f, 1.0f, @"Alpha level for the bar"); HierarchyUtil.Button("Reset", ResetLineAlpha); }); HierarchyUtil.BeginHorizontal(() => { this.lineWidth = HierarchyUtil.Slider("Line Width", this.lineWidth, 0.001f, 3.0f, @"Line width for the bar"); HierarchyUtil.Button("Reset", ResetLineWidth); }); }); HierarchyUtil.LabelField("Item"); HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo("Colorized Item by tree level"); this.colorizedItem = HierarchyUtil.Toggle("Colorized Item", this.colorizedItem, @"Enabled/Disabled to colorized item"); this.drawMode = (DrawMode)HierarchyUtil.EnumPopup("Draw Mode", this.drawMode, @"Mode for item to draw"); HierarchyUtil.BeginHorizontal(() => { this.gradientLength = HierarchyUtil.Slider("Gradient Length", this.gradientLength, 0.01f, 1.0f, @"Time of the gradient faded to alpha 0"); HierarchyUtil.Button("Reset", ResetGradientLength); }); HierarchyUtil.BeginHorizontal(() => { this.overlayAlpha = HierarchyUtil.Slider("Overlay Alpha", this.overlayAlpha, 0.0f, 0.8f, @"Alpha level for the item"); HierarchyUtil.Button("Reset", ResetOverlayAlpha); }); HierarchyUtil.BeginHorizontal(() => { this.baseLevelColor = HierarchyUtil.ColorField("Base Level Color", this.baseLevelColor, @"Base color for colorized item"); HierarchyUtil.Button("Reset", ResetBaseLevelColor); }); HierarchyUtil.BeginHorizontal(() => { instance = ScriptableObject.CreateInstance <Container_TreeData>(); serializedObject = new SerializedObject(instance); propBranches = serializedObject.FindProperty("branches"); DynamicRefresh(); serializedObject.Update(); EditorGUILayout.PropertyField(propBranches); serializedObject.ApplyModifiedProperties(); HierarchyUtil.Button("Reset", ResetBranchesColor); }); }); HierarchyUtil.LabelField("Divider"); HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo("Thin lines indicate each group of tree level"); HierarchyUtil.BeginHorizontal(() => { this.dividerColor = HierarchyUtil.ColorField("Color", this.dividerColor, @"Color for the divider"); HierarchyUtil.Button("Reset", ResetDividerColor); }); HierarchyUtil.BeginHorizontal(() => { this.dividerHeight = HierarchyUtil.Slider("Divider Height", this.dividerHeight, 0.0f, 3.0f, @"Height of the divider"); HierarchyUtil.Button("Reset", ResetDividerHeight); }); }); }); }
public override void Draw() { foldout = EditorGUILayout.Foldout(foldout, FOLD_NAME); if (!foldout) { return; } HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo(INFO); this.enabled = HierarchyUtil.Toggle("Enabeld", this.enabled, @"Enable/Disable all features from this section"); HierarchyUtil.LabelField("Text"); HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo("Show Tag name"); this.enabledText = HierarchyUtil.Toggle("Enabeld", this.enabledText, @"Display text on the side"); HierarchyUtil.BeginHorizontal(() => { this.textColorUntagged = HierarchyUtil.ColorField("Untagged Color", this.textColorUntagged, @"Color for layer, Untagged"); HierarchyUtil.Button("Reset", ResetTextUntaggedColor); }); HierarchyUtil.BeginHorizontal(() => { this.textColor = HierarchyUtil.ColorField("Color", this.textColor, @"Text color for other meaningful tags"); HierarchyUtil.Button("Reset", ResetTextColor); }); }); HierarchyUtil.LabelField("Item"); HierarchyUtil.CreateGroup(() => { HierarchyUtil.CreateInfo("Colorized Item"); this.enabledItem = HierarchyUtil.Toggle("Enabeld", this.enabledItem, @"Colorized items in hierarchy"); HierarchyUtil.BeginHorizontal(() => { HierarchyUtil.LabelField("Colors", @"Color mapping for each tag"); HierarchyUtil.Button("Add", AddTagColor); }); HierarchyUtil.CreateGroup(() => { string[] tags = InternalEditorUtility.tags; int drawn = 0; for (int count = 0; count < itemColors.Count; ++count) { string oldName = itemColors.Keys.ElementAt(count); int oldSelection = TagToIndex(oldName); HierarchyUtil.BeginHorizontal(() => { int currentSelection = HierarchyUtil.Popup(oldSelection, tags); string currentName = IndexToTag(currentSelection); Color col = HierarchyUtil.ColorField("", itemColors[oldName], @"Color for this tag, " + currentName); RemoveTagColor(oldName); if (itemColors.ContainsKey(currentName)) { itemColors[currentName] = col; } else { itemColors.Add(currentName, col); } if (HierarchyUtil.Button("Remove")) { RemoveTagColor(currentName); } ++drawn; }); } if (drawn == 0) { EditorGUILayout.LabelField("No specification"); } }); HierarchyUtil.BeginHorizontal(() => { this.gradientLength = HierarchyUtil.Slider("Gradient Length", this.gradientLength, 0.01f, 1.0f, @"Time of the gradient faded to alpha 0"); HierarchyUtil.Button("Reset", ResetGradientLength); }); this.invertDirection = HierarchyUtil.Toggle("Invert", this.invertDirection, @"Invert the gradient direction"); }); }); }