Unity - Scripting API: Toolbars.MainToolbar.Refresh
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.
Declaration
public static void Refresh(string path);
Description
Notify the main toolbar to update the content or behaviour of a toolbar element.
The state of a `MainToolbarElements` only changes when a user updates the state. To do this, callbacks tell the user when to update their state as a result of UI interaction, for example when they select a toggle. Then, call `MainToolbar.Refresh` to update the UI to match the new state. You can call `MainToolbar.Refresh` whenever the state changes. For example, when the state changes internally and not as a result of UI interaction.