I made a custom window for the editor, but I can’t figure out how to create a window where a texture can be plugged in.
heres how I got it to work (C #)
Texture2D backgroundImage;
OnGUI(){
backgroundImage = (Texture2D) EditorGUILayout.ObjectField(“Image”, backgroundImage, typeof (Texture2D), false);
}
read these:
http://unity3d.com/support/documentation/ScriptReference/EditorGUIUtility.FindTexture.html
http://unity3d.com/support/documentation/ScriptReference/EditorGUI.DrawPreviewTexture.html
that should help.
Figured it out, needed to change object type from object to texture2d