Trying to assign sprite field in EditorGUILayout. EditorGUILayout.ObjectField only accepts Texture2D, but I need to assign a sprite to an (UI)Image.sprite. Having a problem searching this because I’m not sure of how to word it.
Basically I need this:
field.Icon = (Texture2D) EditorGUILayout.ObjectField (“Icon”, field.Icon, typeof(Texture2D), true);
but for Sprite, if you get where I’m coming from.