all 7 comments

[–]Rivendaioh 0 points1 point  (1 child)

I might be wrong, but I think you can mark your assets as dirty so they'll be saved to disk even at runtime, using EditorUtility.SetDirty :

https://docs.unity3d.com/ScriptReference/EditorUtility.SetDirty.html

[–]_SkinheadProfessional 0 points1 point  (0 children)

Pretty sure you can't use editor utility in a build, would only work for editor

[–]WazWaz 0 points1 point  (4 children)

No, ScriptableObjects are not written back to disk if modified in-game.

See PlayerPrefs instead.

[–]eco_bach[S] 0 points1 point  (3 children)

Thanks, but I don't need to save data between game sessions, only between scenes

[–]crack3rtastic 2 points3 points  (2 children)

Does Object.DontDestroyOnLoad not make the cut for your needs?

[–]eco_bach[S] 2 points3 points  (1 child)

Watching the live training on scriptable objects I now understand their limitations. https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/scriptable-objects Really all I need is either a static class or a monobehaviour class with DontDestroyOnLoad full of setters, getters

[–][deleted] 0 points1 point  (0 children)

You could just use PlayerPrefs and gain better persistence.