I’ve been making tons of custom editors. At first I started using target only as SPs was a pain to work with - but then I realized the benefits SPs give, and managed to get along.
But at no point of time, I used SetDirty
- I still see it in some editor scripts, but don’t really know why they ever need it.
The docs says that you need to SetDirty
on a prefab for ex, if you change a value in one of its MonoBehavoiurs
for it to be saved to disk.
I haven’t found any need to do that. I could change a value in a prefab’s MB, enter/exit play mode, exit/re-enter Unity - the value is still there.
So what’s the use of SetDirty, and when do I ever need it? Is this some legacy thing that was used when dealing with target
directly?
Thanks!