Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Is there any way to implement 'Undo' for ScriptableObject assets?

$
0
0
I have trouble implementing 'undo' for a few of my config assets (ScriptableObject's). [CustomEditor(MyConfig)] class MyConfigEditor (Editor): config as MyConfig def Awake(): config = target as MyConfig def OnInspectorGUI(): if GUILayout.Button("Change config"): Undo.RegisterUndo(config, "Changed config") ... changing the config EditorUtility.SetDirty(config) It seems like undo operations are reflected in the file system, but not in the inspector.

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>