Resets any cached state for the version control bar.
This method can be left empty if there's no cached state.
using UnityEditor; using UnityEditor.VersionControl; using UnityEngine;
[VersionControl("Custom")] public class CustomVersionControlObject : VersionControlObject, IInspectorWindowExtension { string m_State;
public void OnVersionControlBar(Editor editor) { if (m_State == null) m_State = "Ready"; GUILayout.Label("State: " + m_State); }
public void InvalidateVersionControlBarState() { m_State = null; } }
Additional resources: IInspectorWindowExtension, VersionControlObject.