Horje
unity editor dropdown Code Example
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; 




Csharp

Related
c# for loop Code Example c# for loop Code Example
how to stop a coroutine unity c# Code Example how to stop a coroutine unity c# Code Example
Get Enum Name Code Example Get Enum Name Code Example
c# drive info Code Example c# drive info Code Example
c# list string return concatenate Code Example c# list string return concatenate Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7