Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity custom editor hide values in dropdown list

[CustomEditor(typeof(MyScript))]
 public class MyScriptEditor : Editor
 {
    private bool showFields;

    public override void OnInspectorGUI()
    {
    	// The Foldout stores a bool describing whether the foldout is expanded or not
        showFields = EditorGUILayout.Foldout(showFields, "Display Fields");

		// If the foldout is expanded, display all the values
        if (showFields)
        {
            EditorGUI.indentLevel++;
            
            // Use this to display everthing, or write code for a more customized editor here
            DrawDefaultInspector();
            
            EditorGUI.indentLevel--;
        }
    }
 }
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to trigger event when a com device is connected in c# 
Csharp :: C# Printing Variables and Literals using WriteLine() and Write() 
Csharp :: connection string of bulk insert with csv in c# 
Csharp :: null objects 
Csharp :: c# xaml textblock new line 
Csharp :: unity only one component type 
Csharp :: unity raycast hit child object 
Csharp :: c# mail retrieve library 
Csharp :: unity Texture2D efficient performance draw pixels 
Csharp :: c# array accessor 
Csharp :: what is string args in c# 
Csharp :: windows forms tablelayoutpanel scroll 
Csharp :: dotnet DB context register 
Csharp :: c# convert datatable to csv 
Csharp :: c# make a negative number positive 
Csharp :: dotnet core webapp 
Csharp :: unity pause 
Csharp :: c# loop example 
Csharp :: what is c# used for 
Csharp :: web scraping dynamic content c# 
Csharp :: how to backgrund c# red 
Csharp :: c# .net stringify data query 
Html :: trademark symbol 
Html :: html disable editing textbox 
Html :: html input regex only numbers 
Html :: Add Random Image from Web in html 
Html :: html center image vertically bootstrap 
Html :: how to switch between html pages 
Html :: import font awesome 
Html :: how to change the logo in the title of a webpage 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =