I got Unity3D 5.2 and first used the Dropdown GUI element. It is easy to use in insepctor, but I want the parameters to be displayed, depending on my files in the "Resources / Forms" /
So, in the drop-down list, all the file names that I got in Resources / Shapes / should be displayed, but I can not get this property in the attached C # script. After reading the manual, the drop-down list should have a property named "Parameters" and it should have a string and an image variable. (So, for my understanding, its two-dimensional array-ish-type)
Unfortunately, I cannot use the following script (pseudo-code, since it does not work)
GameObject obj = GameObject.Find("Dropdown");
var info = new DirectoryInfo("Assets/Resources/Shapes");
var fileInfo = info.GetFiles();
foreach (var file in fileInfo)
{
obj.Options += file;
}
- , Options Dropdown pls, - Google. , Unity