Hi there,
I’ve spent hours trying to figure out why this isn’t working (I’ve followed everything I’ve seen on the internet as well). I am creating a conversation editor which represents each message, choice, etc. as a node.
After hitting save I can switch between different conversation asset files no problem; It saves the changes to disk. However, after play testing all of my changes are gone (as in, I press play, the game loads the asset, then wipes it). Here’s the code I use to load the asset:
ConversationEditor editor = EditorWindow.GetWindow (); editor.conversation = (Conversation)Selection.activeObject; editor.activeObject = Selection.activeObject; editor.saveLocation = AssetDatabase.GetAssetPath (Selection.activeInstanceID); Undo.RecordObject (editor.conversation, "Edit Conversation");
Here’s the code I use to save the asset:
AssetDatabase.Refresh (); EditorUtility.SetDirty (_conversation); AssetDatabase.SaveAssets ();
The conversation class extends Scriptable Object. Please help. I’m not sure what to do anymore.