Unity Editor includes these message expression types:
Errors and other types of alerts are used to communicate conditions, indicate an event, or show responses to user actions. They can be expressed with dialogs (pop-up modals), window banners,
help boxes, or console and status logs.
Error icon: Represented by a red octagonal warning icon with an exclamation mark
Warning icon: Represented by a yellow triangle warning icon with an exclamation mark
Info (log) icon: Represented by a white speech bubble icon with an exclamation mark
Well written alert messages should be:
Messages should use the plainest possible language that can clearly convey the message. Avoid obscure codes, abbreviations, and technical jargon. Ideally, a beginner-level user of the feature should be able to understand the alert message.
Only include the information the user needs to understand and resolve the immediate problem.
Alert messages should not be written in a negative voice that blames users for incorrect usage but in a positive or neutral voice. Avoid phrases like "illegal command".
All error and warning messages relating to a specific problem should include these three key elements, in this order:
Ensure the problem is clearly identified in plain language.
Where possible include the cause of the problem so that the message not only helps correct this particular instance of a problem, but becomes a teachable moment that helps prevent future mistakes.
Recommend constructive advice on how to fix the problem.
Do include any phrasing that specifically relates to that error so users can look up that exact problem on a search engine using precise wording.
Don't use vague wording such as "syntax error".
Don't begin the error or warning message with “Error” or “Warning” as the color styling and associated icon makes this wording redundant.
Dialogs are messages that present a short-term task the user must perform to continue the operation. Users won't be able to interact with the Editor until the dialog is closed.
Editor displays the native OS dialog window
Do not show again
For dialog boxes that might be shown repeatedly, consider using an overload of this method that takes a DialogOptOutDecisionType
Editor displays the native operating system dialog
Window banners are used to provide brief feedback about an operation that affects the entire active window. They are used for informative purposes and are not persistent on the screen.
Window banners are rendered via the function EditorWindow.ShowNotification in the affected interface.
Section messages (help boxes) are used to alert the user of something that happened in a specific section of an Editor window, such as a property setting.
They appear as help boxes in the affected interface.
Console messages are important messages that help users with debugging the application / issue and to log important messages in the console.
Assigning an object
Use context parameter to set the object which the message applies to.
If you pass a GameObject or Component as the optional context argument, the object will highlight in the Hierarchy window when you click the log message in the Console.
Scale and location
Severity: Is it critical? Does it disrupt the user flow?