- Home /
Select custom object from a list via PopUp in custom editor for ScriptableObject
Hello everybody!
I have this ScriptableObject named Dialog, which has an attribute of type Character and another one of type Emotion. Here is the diagram:
What I want is to create a custom editor for the class Dialog, that has a EditorGUILayout.Popup to select the selectedEmotion from the emotions list stored in the character. This emotion, character and dialog are all ScriptableObjects and are stored in the Assets folder, so there should be no need to create new assets. Also, if the emotion scriptableObject changes, so should its reference in Dialog.
I have been pulling my hair for a couple days trying to wrap my head around SerializedProperty(ies), but I simply can't get it to work. I can provide some of my not working code if you want to, too. Also, I would prefer not to use target nomenclature and so on, but rather SerializedProperties for better integration.
Any help at all will be really appreciated, thanks!
Your answer
Follow this Question
Related Questions
How do I associate my custom object for the serializedProperty objectReferenceValue 1 Answer
Prevent changes in ScriptableObject type Asset in Editor. Dont save it. 0 Answers
ProjectWindowUtil.CreateAsset causes a memory leak 0 Answers
pass child class to ScriptableObject.CreateInstance<> ? 1 Answer