mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: Prevent Compiler Paradox (#1145)
* Prevent Compiler Paradox * Change platform to Editor Only * added new line at EOF
This commit is contained in:
parent
ae2f5cb7d8
commit
fd43c67d68
8
Assets/Mirror/CompilerSymbols.meta
Normal file
8
Assets/Mirror/CompilerSymbols.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f8b918bcd89f5c488b06f5574f34760
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
14
Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef
Normal file
14
Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "Mirror.CompilerSymbols",
|
||||
"references": [],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": []
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 325984b52e4128546bc7558552f8b1d2
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
25
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs
Normal file
25
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs
Normal file
@ -0,0 +1,25 @@
|
||||
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",
|
||||
"MIRROR_4_0_OR_NEWER"
|
||||
};
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, string.Join(";", defines));
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs.meta
Normal file
11
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f1d66fe74ec6f42dd974cba37d25d453
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,25 +1,4 @@
|
||||
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",
|
||||
"MIRROR_4_0_OR_NEWER"
|
||||
};
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, string.Join(";", defines));
|
||||
}
|
||||
}
|
||||
}
|
||||
// This file was moved to Mirror/CompilerSymbols in Mirror 4.0
|
||||
// The purpose of this file is to get the old file overwritten
|
||||
// when users update from the asset store to prevent a flood of errors
|
||||
// from having the old file still in the project as a straggler.
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f1d66fe74ec6f42dd974cba37d25d453
|
||||
guid: 42760e6965bea614ca5706a6ba059531
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
@ -1,8 +1,14 @@
|
||||
{
|
||||
"name": "Mirror",
|
||||
"references": [],
|
||||
"references": [
|
||||
"Mirror.CompilerSymbols"
|
||||
],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": []
|
||||
}
|
Loading…
Reference in New Issue
Block a user