1
Fork 0
mirror of https://github.com/Steffo99/better-tee.git synced 2024-11-22 15:24:18 +00:00
better-tee/Assets/Packages/Mirror/Editor/PreprocessorDefine.cs
2019-09-17 17:43:32 +02:00

24 lines
810 B
C#

using System.Collections.Generic;
using UnityEditor;
namespace Mirror
{
static class PreprocessorDefine
{
/// <summary>
/// Add define symbols as soon as Unity gets done compiling.
/// </summary>
[InitializeOnLoadMethod]
static void AddDefineSymbols()
{
HashSet<string> defines = new HashSet<string>(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));
}
}
}