How to tell Unity that it needs to save vic C#?

Hey all, I have an editor script that is making changes in the inspector. When these changes are made, I need to tell unity to ask if I want to save before closing unity. (it doesn’t seem to realize that changes were made)
How would I do this?

Thanks :slight_smile:

There are a few ways in which you can achieve exactly that.

You need to at least mark the component to be dirty:

A good option is also the editor property functionality. You automatically get undo and set dirty.

Another option is Undo directly. Besides the undo functionality it also applies set dirty automatically.

Thanks for your reply, I already have set dirty when GUI.Changed!

But, isn’t there something about needing to have “undo” when loading to the asset store? Come to think of it.
(Just want to make sure I do it right the first time) :slight_smile:

thanks for your assistance!!!

You are right, undo is a requirement for the asset store.

Thank you for your help.