Unity - Scripting API: Editor.saveChangesMessage
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
public string saveChangesMessage;
Description
The message that displays to the user if they are prompted to save.
Set saveChangesMessage in a derived class to prevent users from accidentally losing unsaved work. For saveChangesMessage to work, you must use it with Editor.hasUnsavedChanges and override the Editor.SaveChanges method. This message shows exactly as you have written it. This message presents to users who have unsaved changes, if they attempt to close the Inspector, change Selection or enter Playmode. The save changes message might combine with other messages from other editors. This occurs if there are multiple editors that have unsaved changes.