using System.Collections.Generic; using UnityEditor; namespace Mirror { static class PreprocessorDefine { /// /// Add define symbols as soon as Unity gets done compiling. /// [InitializeOnLoadMethod] static void AddDefineSymbols() { HashSet defines = new HashSet(PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup).Split(';')) { "MIRROR", "MIRROR_1726_OR_NEWER", "MIRROR_3_0_OR_NEWER", "MIRROR_3_12_OR_NEWER" }; PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, string.Join(";", defines)); } } }