Added multiplayer plugin

This commit is contained in:
Anthony Berg
2020-11-30 08:12:07 +00:00
parent 9cb342dd42
commit f64cf54803
450 changed files with 33131 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
{
"name": "Mirror.CompilerSymbols",
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 325984b52e4128546bc7558552f8b1d2
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,49 @@
using System.Collections.Generic;
using UnityEditor;
namespace Mirror
{
static class PreprocessorDefine
{
/// <summary>
/// Add define symbols as soon as Unity gets done compiling.
/// </summary>
[InitializeOnLoadMethod]
public static void AddDefineSymbols()
{
string currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
HashSet<string> defines = new HashSet<string>(currentDefines.Split(';'))
{
"MIRROR",
"MIRROR_1726_OR_NEWER",
"MIRROR_3_0_OR_NEWER",
"MIRROR_3_12_OR_NEWER",
"MIRROR_4_0_OR_NEWER",
"MIRROR_5_0_OR_NEWER",
"MIRROR_6_0_OR_NEWER",
"MIRROR_7_0_OR_NEWER",
"MIRROR_8_0_OR_NEWER",
"MIRROR_9_0_OR_NEWER",
"MIRROR_10_0_OR_NEWER",
"MIRROR_11_0_OR_NEWER",
"MIRROR_12_0_OR_NEWER",
"MIRROR_13_0_OR_NEWER",
"MIRROR_14_0_OR_NEWER",
"MIRROR_15_0_OR_NEWER",
"MIRROR_16_0_OR_NEWER",
"MIRROR_17_0_OR_NEWER",
"MIRROR_18_0_OR_NEWER",
"MIRROR_24_0_OR_NEWER",
"MIRROR_26_0_OR_NEWER"
};
// only touch PlayerSettings if we actually modified it.
// otherwise it shows up as changed in git each time.
string newDefines = string.Join(";", defines);
if (newDefines != currentDefines)
{
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, newDefines);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f1d66fe74ec6f42dd974cba37d25d453
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: