UnityEditor.AssetInspector.OnAssetStatusGUI C# (CSharp) Method

OnAssetStatusGUI() public method

public OnAssetStatusGUI ( Rect r, int id, Object target, GUIStyle style ) : void
r UnityEngine.Rect
id int
target Object
style UnityEngine.GUIStyle
return void
        public void OnAssetStatusGUI(Rect r, int id, Object target, GUIStyle style)
        {
            if (target != null)
            {
                GUIContent content;
                ChangeFlags changeFlags = this.GetChangeFlags();
                string modificationString = this.GetModificationString(changeFlags);
                if (modificationString == string.Empty)
                {
                    content = EditorGUIUtility.TextContent("Asset is unchanged");
                }
                else
                {
                    content = new GUIContent("Locally " + modificationString);
                }
                if (EditorGUI.DoToggle(r, id, false, content, style))
                {
                    GUIUtility.hotControl = 0;
                    r = new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 1f, 1f);
                    EditorUtility.DisplayCustomMenu(r, (modificationString != string.Empty) ? this.m_Menu : this.m_UnmodifiedMenu, -1, new EditorUtility.SelectMenuItemFunction(this.ContextMenuClick), modificationString == string.Empty);
                }
            }
        }
    }