- Home /
Question by
MattSawrey · Aug 27, 2016 at 01:47 PM ·
imageassetguicontent
Accessing the .asset file type image for a selection grid
I'm creating a selection grid in a custom editor using an array of GUIContent objects. I would like these GUIContents to use the image that a ScriptableObject .asset file is given in the project inspector (the one with the Unity logo on top of a grey/blueish box). I'm not sure how to access this image though. I know some Unity image textures can be access by using the following method:
EditorGUIUtility.ObjectContent(null, typeof(ScriptableObject)).image
But I'm unsure how to use this to access the .asset file type image.
Thanks in advance.
Matt
Comment