/* ┌──────────────────────────────────────────────────────────────────┐ │ Author: Ivan Murzak (https://github.com/IvanMurzak) │ │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │ │ Copyright (c) 2025 Ivan Murzak │ │ Licensed under the Apache License, Version 2.0. │ │ See the LICENSE file in the project root for more information. │ └──────────────────────────────────────────────────────────────────┘ */ #nullable enable using System.Collections.Generic; using com.IvanMurzak.Unity.MCP.Editor.Utils; using UnityEditor; using UnityEngine; namespace com.IvanMurzak.Unity.MCP.Editor.UI { /// /// Exposes Unity-MCP's team-shared update settings under /// Edit ▸ Project Settings ▸ AI Game Developer. /// /// /// Mutations write through to , whose backing /// asset (ProjectSettings/AI-Game-Developer-UpdateSettings.asset) is intended to be /// committed to VCS. See https://github.com/IvanMurzak/Unity-MCP/issues/768. /// internal static class UnityMcpProjectSettingsProvider { private const string SettingsPath = "Project/AI Game Developer"; [SettingsProvider] public static SettingsProvider Create() => new SettingsProvider(SettingsPath, SettingsScope.Project) { label = "AI Game Developer", guiHandler = _ => { EditorGUILayout.LabelField("Update Notifications", EditorStyles.boldLabel); EditorGUI.BeginChangeCheck(); var newValue = EditorGUILayout.ToggleLeft( new GUIContent( "Disable update notifications for the entire team", "Stored in ProjectSettings/ and shared with everyone who clones this project. " + "When enabled, the update popup is suppressed for every team member, regardless " + "of their per-user 'Do not show again' state."), UpdateChecker.IsDisabledForProject); if (EditorGUI.EndChangeCheck()) UpdateChecker.IsDisabledForProject = newValue; EditorGUILayout.Space(); EditorGUILayout.HelpBox( "This setting is stored in ProjectSettings/AI-Game-Developer-UpdateSettings.asset " + "and is shared with everyone who clones this project. The per-user 'Do not show again' " + "button on the update popup is unaffected by this setting.", MessageType.Info); }, keywords = new HashSet { "AI", "MCP", "Unity-MCP", "OpenUPM", "Update", "Notifications", "Team", "Game", "Developer" } }; } }