using UnityEditor;

public class CleanDefines
{
    [MenuItem("Tools/Clean All Scripting Defines")]
    public static void CleanAll()
    {
        // Nettoie pour toutes les plateformes
        BuildTargetGroup[] targets = new BuildTargetGroup[]
        {
            BuildTargetGroup.Standalone,
            BuildTargetGroup.WebGL,
            BuildTargetGroup.Android,
            BuildTargetGroup.iOS
        };

        foreach (var target in targets)
        {
            try
            {
                PlayerSettings.SetScriptingDefineSymbols(
                    UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(target),
                    new string[] { }
                );
            }
            catch { }
        }

        UnityEngine.Debug.Log("✅ Tous les symboles nettoyés !");
        AssetDatabase.Refresh();
    }
}