- Home /
Editor Window with List input of Texture2D
I'm trying to create an Editor Window or Dialog box that has an input control where the user can draw Texture2D objects into it similar to the way textures are added to a Terrain object.
My first attempt was using a ScriptableWizard and a public List
public class ApplyTexturesWizard : ScriptableWizard
{
public List<Texture2D> list = new List<Texture2D>();
[MenuItem("GameObject/Apply Texture(s)")]
public static void ApplyTextures() {
ScriptableWizard.DisplayWizard<ApplyTexturesWizard> ("Apply Textures", "Apply");
}
void OnWizardCreate() {
//Apply the textures
}
void OnWizardUpdate() {
helpString = "Add the textures:";
}
}
However, that comes out to look more like this:
Now, I'm not even sure if ScriptableWizard is what I want. Maybe I want to create a UnityEditor Window? I just want to create a popup dialog style box that prompts the user to add a bunch of textures to a list similar to how the terrain editor works. Drag and drop functionality would be nice too (the terrain editor doesn't allow that).
What controls should I be using to accomplish this feature? Not looking for code, just a nudge in the right direction. I've looked over the Unity Scripting Reference, but it's difficult to find much information on this in my opinion.
Thanks.
Your answer
Follow this Question
Related Questions
Custom Resolution Dialog at Start? 1 Answer
How to set the editor's layer mask from script? 2 Answers
MCF dialogs won't open in unity 0 Answers
Hotkey to play animation 1 Answer