-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent Compiler Paradox (#1145)
* Prevent Compiler Paradox * Change platform to Editor Only * added new line at EOF
- Loading branch information
Showing
8 changed files
with
78 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Mirror.CompilerSymbols", | ||
"references": [], | ||
"optionalUnityReferences": [], | ||
"includePlatforms": [ | ||
"Editor" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [] | ||
} |
7 changes: 7 additions & 0 deletions
7
Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
{ | ||
"name": "Mirror", | ||
"references": [], | ||
"references": [ | ||
"Mirror.CompilerSymbols" | ||
], | ||
"optionalUnityReferences": [], | ||
"includePlatforms": [], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [] | ||
} |