x


Determine if editor is in dirty state (current scene needs to be saved)

Hello,

I couldn't find any info about this...

I'm building an editor window who can change scene when you click on a button. I'd like to know if the current scene is dirty (something changed and needs to be saved) or not, prior to opening the new one. Is there any way to do it?

Thanks

more ▼

asked Feb 08 '12 at 01:42 PM

Izitmee gravatar image

Izitmee
1.2k 18 22 41

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Found a sort of solution. Calling EditorApplication.SaveCurrentSceneIfUserWantsTo() will open a save popup only if the current scene is dirty.

more ▼

answered Feb 08 '12 at 05:53 PM

Izitmee gravatar image

Izitmee
1.2k 18 22 41

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x110
x55
x8

asked: Feb 08 '12 at 01:42 PM

Seen: 570 times

Last Updated: Feb 08 '12 at 05:53 PM