Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity editor dropdown

//there are two main ways of doing this.
//1. Enumerators
enum Level {Low, Medium, High}
public Level myLevel; //this variable will appear as a drop down
//this method does only work for enum values so if you want strings you'll
//have to use method 2.
//2. Dropdown list. This one requires you to add an asset from the unity store.
//Link: https://assetstore.unity.com/packages/tools/utilities/dropdown-attribute-180951
public List<string> NameList;
[Dropdown("NameList")]//input the path of the list
public string MyName; 
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# static meaning 
Csharp :: if number negative c sharp 
Csharp :: unity c# check how many of an object exists 
Csharp :: c# enum to int 
Csharp :: move files from one directory to another using c# 
Csharp :: c# remove character from string at index 
Csharp :: c-sharp - get current page url/path/host 
Csharp :: c# convert string to url encoding 
Csharp :: unity post processing ui 2d 
Csharp :: c# messagebox result 
Csharp :: inline creation dictionnary C# 
Csharp :: can you have multiple statement in a case c# 
Csharp :: unity random string 
Csharp :: c# Get type with namespace 
Csharp :: Net.ServicePointManager.SecurityProtocol .net framework 4 
Csharp :: c# enum syntax 
Csharp :: how to use navmeshagent in unity 
Csharp :: c# cancellationtoken example 
Csharp :: c# razor add disabled to button if 
Csharp :: c# break from foreach method 
Csharp :: c# remove first 5 characters from string 
Csharp :: datetimeoffset to datetime c# 
Csharp :: Convert DataTable to Dictionary in C# 
Csharp :: unity get default font 
Csharp :: c# get last day of month 
Csharp :: bash create temporary folder 
Csharp :: unity get center of object 
Csharp :: rotation unity script 2d 
Csharp :: c# public static string 
Csharp :: change size of a unity object 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =