I want make dropdown menu to choose image from given. The problem is that image doesn't show in dropdown, only in already chosen. So I can see image only after I choose it from dropdown.

I need every option in dropdown to have it's own little image so I can see which one I wanna edit.
here's editor code (in runeMaker.runeStorage.runes[i].preview we get simply Texture2D)
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(RuneMaker))]
public class RuneMakerEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
RuneMaker runeMaker = (RuneMaker)target;
GUIContent[] imagesToChooseFrom = new GUIContent[runeMaker.runeStorage.runes.Count];
for (int i = 0; i < runeMaker.runeStorage.runes.Count; i++)
{
imagesToChooseFrom[i] = new GUIContent("rune " + i.ToString(), runeMaker.runeStorage.runes[i].preview);
}
runeMaker.runeToEditIndex = EditorGUILayout.Popup
(
label:new GUIContent("rune to edit"),
selectedIndex:runeMaker.runeToEditIndex,
displayedOptions:imagesToChooseFrom
);
if (GUILayout.Button("New rune")) runeMaker.NewRune();
}
}
is it even possible to insert images to inspector dropdown?
Appears that it's not possible to make inspector dropdown menu show images and text altogether. So I get another approach. I make custom Editor Window, that has scrollview and bunch of images each with it's own button. Following script have to be placed inside Assets/Editor folder.