AssetBundleGraph.NodeGUIEditor.DrawOverrideTargetToggle C# (CSharp) Method

DrawOverrideTargetToggle() private method

private DrawOverrideTargetToggle ( NodeGUI node, bool status, Action onStatusChange ) : EditorGUI.DisabledScope
node NodeGUI
status bool
onStatusChange Action
return EditorGUI.DisabledScope
        private EditorGUI.DisabledScope DrawOverrideTargetToggle(NodeGUI node, bool status, Action<bool> onStatusChange)
        {
            if( currentEditingGroup == BuildTargetUtility.DefaultTarget ) {
                return new EditorGUI.DisabledScope(false);
            }

            bool newStatus = GUILayout.Toggle(status,
                "Override for " + NodeGUIUtility.GetPlatformButtonFor(currentEditingGroup).ui.tooltip);

            if(newStatus != status && onStatusChange != null) {
                onStatusChange(newStatus);
            }
            return new EditorGUI.DisabledScope(!newStatus);
        }