Hey there,
If you have a game object that has a script that has a texture, you can drag a texture from the asset panel onto the texture variables text box thing and it will apply that texture.
I wish to create something like that for my own custom editor, but when I use:
Script.m_Texture = (Texture2D)EditorGUILayout.ObjectField("Texture", Script.m_Texture, typeof(Texture2D), true);
It comes up with a big ugly texture box.
Does anyone know how to recreate the texture box in the default inspector?
Additionally:
When you create an EditorGUILayout and pass in a blank GUIStyle, EVERYTHING disappears. How do you get the icons on the right hand side of a (for example) drop down list to show up again? I can’t figure out which part of the GUIStyle controls those.
Thanks in advance!!