Quantcast
Channel: Latest Questions by aosome23
Viewing all articles
Browse latest Browse all 64

PropertyDrawer: Texture2D preview not showing up

$
0
0
SerializedProperty sp = property.FindPropertyRelative("springTexture") sp .objectReferenceValue = EditorGUI.ObjectField(position, "asdf", sp .objectReferenceValue, typeof(Texture2D), false); I have the code shown above. However when I test it out in the editor, I can assign it a texture (and it opens it when i double click the field) however, the preview doesnt show (as seen below) the image which is really important to me. ![alt text][1] [1]: /storage/temp/70010-capture.png (Empty slots show that it is "None" but the ones that are assigned just turn in to blank) [Edit] It sort of shows up for a fraction of a second when the script gets refreshed, but it disappears right after that.

Viewing all articles
Browse latest Browse all 64

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>