WebSep 14, 2024 · You need to pass the correct object to mark as dirty to EditorUtility.SetDirty();. Currently you're passing bc but you need to pass obj, because … WebAug 12, 2024 · The steps: 1. Uncheck the "Compress Assets when Importing" in Unity. 2. Copy a image to "Textures" folder. (Relative to project folder "Assets/Textures/a.png") 3. Check that all parameters in the inspector are default. " (Not yet compressed)" is displayed in the preview window of Texture Importer in inspector.
[SOLVED] ScriptableObject is NOT getting saved! - Unity Forum
WebJan 20, 2024 · The instance ID of an object is always unique. The ID changes between player runtime and Editor sessions. As such, the ID is not reliable for performing actions between the Editor and runtime sessions, for example, loading an object state from a save file. So within a runtime session the id is guaranteed to be unique. WebMar 9, 2024 · If you want to save that asset you have to call. Code (csharp): AssetDatabase.Refresh() ; first, then you have to mark the object that you load from the .asset file as dirty. Code (csharp): EditorUtility.SetDirty(object loaded from .asset file); and then call. Code (csharp): AssetDatabase.SaveAssets(); handout ai
EditorUtility.SetDirty Broken? - Unity Forum
WebDec 9, 2024 · EditorUtility.SetDirty(targetObject); *Edit* I did have a problem that I was asking about, but of course I had an epiphany moments after assuming it was Unity's fault. (I noticed the asterisk showing that I had failed to save my own code file.) I left my working pseudo-code up, hoping it helps others. WebJul 14, 2024 · Does this apply all changes made to an object ala EditorUtility.SetDirty or does this only apply/save the changes made through SerializedProperties? I ask because I have editor scripts that when certain changes occur go ahead and modify additional properties on an object (accessing the object directly and setting the values, not through ... WebJul 17, 2024 · Any chance for a EditorUtility.ClearDirty () ? CleanDirty () = save your work. Roll your own solution to track changes, leave the dirty flag to tell Unity if something has changed since last save otherwise you (or anyone who is using your system) sooner or later will lose their work. Lurking-Ninja, Jul 17, 2024. #3. handout afd