├── .gitattributes
├── .gitignore
├── .vscode
└── settings.json
├── Assets
├── Mirror.meta
├── Mirror
│ ├── CompilerSymbols.meta
│ ├── CompilerSymbols
│ │ ├── Mirror.CompilerSymbols.asmdef
│ │ ├── Mirror.CompilerSymbols.asmdef.meta
│ │ ├── PreprocessorDefine.cs
│ │ └── PreprocessorDefine.cs.meta
│ ├── Components.meta
│ ├── Components
│ │ ├── Discovery.meta
│ │ ├── Discovery
│ │ │ ├── NetworkDiscovery.cs
│ │ │ ├── NetworkDiscovery.cs.meta
│ │ │ ├── NetworkDiscoveryBase.cs
│ │ │ ├── NetworkDiscoveryBase.cs.meta
│ │ │ ├── NetworkDiscoveryHUD.cs
│ │ │ ├── NetworkDiscoveryHUD.cs.meta
│ │ │ ├── ServerRequest.cs
│ │ │ ├── ServerRequest.cs.meta
│ │ │ ├── ServerResponse.cs
│ │ │ └── ServerResponse.cs.meta
│ │ ├── Experimental.meta
│ │ ├── Experimental
│ │ │ ├── NetworkLerpRigidbody.cs
│ │ │ ├── NetworkLerpRigidbody.cs.meta
│ │ │ ├── NetworkRigidbody.cs
│ │ │ ├── NetworkRigidbody.cs.meta
│ │ │ ├── NetworkRigidbody2D.cs
│ │ │ ├── NetworkRigidbody2D.cs.meta
│ │ │ ├── NetworkTransform.cs
│ │ │ ├── NetworkTransform.cs.meta
│ │ │ ├── NetworkTransformBase.cs
│ │ │ ├── NetworkTransformBase.cs.meta
│ │ │ ├── NetworkTransformChild.cs
│ │ │ └── NetworkTransformChild.cs.meta
│ │ ├── Mirror.Components.asmdef
│ │ ├── Mirror.Components.asmdef.meta
│ │ ├── NetworkAnimator.cs
│ │ ├── NetworkAnimator.cs.meta
│ │ ├── NetworkLobbyManager.cs
│ │ ├── NetworkLobbyManager.cs.meta
│ │ ├── NetworkLobbyPlayer.cs
│ │ ├── NetworkLobbyPlayer.cs.meta
│ │ ├── NetworkMatchChecker.cs
│ │ ├── NetworkMatchChecker.cs.meta
│ │ ├── NetworkOwnerChecker.cs
│ │ ├── NetworkOwnerChecker.cs.meta
│ │ ├── NetworkPingDisplay.cs
│ │ ├── NetworkPingDisplay.cs.meta
│ │ ├── NetworkProximityChecker.cs
│ │ ├── NetworkProximityChecker.cs.meta
│ │ ├── NetworkRoomManager.cs
│ │ ├── NetworkRoomManager.cs.meta
│ │ ├── NetworkRoomPlayer.cs
│ │ ├── NetworkRoomPlayer.cs.meta
│ │ ├── NetworkSceneChecker.cs
│ │ ├── NetworkSceneChecker.cs.meta
│ │ ├── NetworkTransform.cs
│ │ ├── NetworkTransform.cs.meta
│ │ ├── NetworkTransformBase.cs
│ │ ├── NetworkTransformBase.cs.meta
│ │ ├── NetworkTransformChild.cs
│ │ └── NetworkTransformChild.cs.meta
│ ├── Editor.meta
│ ├── Editor
│ │ ├── EditorHelper.cs
│ │ ├── EditorHelper.cs.meta
│ │ ├── EnterPlayModeSettingsCheck.cs
│ │ ├── EnterPlayModeSettingsCheck.cs.meta
│ │ ├── InspectorHelper.cs
│ │ ├── InspectorHelper.cs.meta
│ │ ├── LogLevelWindow.cs
│ │ ├── LogLevelWindow.cs.meta
│ │ ├── Logging.meta
│ │ ├── Logging
│ │ │ ├── LogLevelWindow.cs
│ │ │ ├── LogLevelWindow.cs.meta
│ │ │ ├── LogLevelsGUI.cs
│ │ │ ├── LogLevelsGUI.cs.meta
│ │ │ ├── LogSettingsEditor.cs
│ │ │ ├── LogSettingsEditor.cs.meta
│ │ │ ├── NetworkLogSettingsEditor.cs
│ │ │ └── NetworkLogSettingsEditor.cs.meta
│ │ ├── Mirror.Editor.asmdef
│ │ ├── Mirror.Editor.asmdef.meta
│ │ ├── NetworkBehaviourInspector.cs
│ │ ├── NetworkBehaviourInspector.cs.meta
│ │ ├── NetworkInformationPreview.cs
│ │ ├── NetworkInformationPreview.cs.meta
│ │ ├── NetworkManagerEditor.cs
│ │ ├── NetworkManagerEditor.cs.meta
│ │ ├── NetworkScenePostProcess.cs
│ │ ├── NetworkScenePostProcess.cs.meta
│ │ ├── SceneDrawer.cs
│ │ ├── SceneDrawer.cs.meta
│ │ ├── ScriptableObjectUtility.cs
│ │ ├── ScriptableObjectUtility.cs.meta
│ │ ├── SyncVarAttributeDrawer.cs
│ │ ├── SyncVarAttributeDrawer.cs.meta
│ │ ├── Weaver.meta
│ │ └── Weaver
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── AssemblyInfo.cs.meta
│ │ │ ├── CompilationFinishedHook.cs
│ │ │ ├── CompilationFinishedHook.cs.meta
│ │ │ ├── Extensions.cs
│ │ │ ├── Extensions.cs.meta
│ │ │ ├── Helpers.cs
│ │ │ ├── Helpers.cs.meta
│ │ │ ├── Log.cs
│ │ │ ├── Log.cs.meta
│ │ │ ├── Mirror.Weaver.asmdef
│ │ │ ├── Mirror.Weaver.asmdef.meta
│ │ │ ├── Processors.meta
│ │ │ ├── Processors
│ │ │ ├── CommandProcessor.cs
│ │ │ ├── CommandProcessor.cs.meta
│ │ │ ├── GenericArgumentResolver.cs
│ │ │ ├── GenericArgumentResolver.cs.meta
│ │ │ ├── MessageClassProcessor.cs
│ │ │ ├── MessageClassProcessor.cs.meta
│ │ │ ├── MethodProcessor.cs
│ │ │ ├── MethodProcessor.cs.meta
│ │ │ ├── MonoBehaviourProcessor.cs
│ │ │ ├── MonoBehaviourProcessor.cs.meta
│ │ │ ├── NetworkBehaviourProcessor.cs
│ │ │ ├── NetworkBehaviourProcessor.cs.meta
│ │ │ ├── PropertySiteProcessor.cs
│ │ │ ├── PropertySiteProcessor.cs.meta
│ │ │ ├── ReaderWriterProcessor.cs
│ │ │ ├── ReaderWriterProcessor.cs.meta
│ │ │ ├── RpcProcessor.cs
│ │ │ ├── RpcProcessor.cs.meta
│ │ │ ├── ServerClientAttributeProcessor.cs
│ │ │ ├── ServerClientAttributeProcessor.cs.meta
│ │ │ ├── SyncDictionaryProcessor.cs
│ │ │ ├── SyncDictionaryProcessor.cs.meta
│ │ │ ├── SyncEventProcessor.cs
│ │ │ ├── SyncEventProcessor.cs.meta
│ │ │ ├── SyncListProcessor.cs
│ │ │ ├── SyncListProcessor.cs.meta
│ │ │ ├── SyncObjectInitializer.cs
│ │ │ ├── SyncObjectInitializer.cs.meta
│ │ │ ├── SyncObjectProcessor.cs
│ │ │ ├── SyncObjectProcessor.cs.meta
│ │ │ ├── SyncVarProcessor.cs
│ │ │ ├── SyncVarProcessor.cs.meta
│ │ │ ├── TargetRpcProcessor.cs
│ │ │ └── TargetRpcProcessor.cs.meta
│ │ │ ├── Program.cs
│ │ │ ├── Program.cs.meta
│ │ │ ├── Readers.cs
│ │ │ ├── Readers.cs.meta
│ │ │ ├── Resolvers.cs
│ │ │ ├── Resolvers.cs.meta
│ │ │ ├── TypeReferenceComparer.cs
│ │ │ ├── TypeReferenceComparer.cs.meta
│ │ │ ├── Weaver.cs
│ │ │ ├── Weaver.cs.meta
│ │ │ ├── WeaverExceptions.cs
│ │ │ ├── WeaverExceptions.cs.meta
│ │ │ ├── WeaverTypes.cs
│ │ │ ├── WeaverTypes.cs.meta
│ │ │ ├── Writers.cs
│ │ │ └── Writers.cs.meta
│ ├── Icon.meta
│ ├── Icon
│ │ ├── MirrorIcon.png
│ │ └── MirrorIcon.png.meta
│ ├── Notice.txt
│ ├── Notice.txt.meta
│ ├── Plugins.meta
│ ├── Plugins
│ │ ├── Mono.Cecil.meta
│ │ └── Mono.Cecil
│ │ │ ├── License.txt
│ │ │ ├── License.txt.meta
│ │ │ ├── Mono.CecilX.Mdb.dll
│ │ │ ├── Mono.CecilX.Mdb.dll.meta
│ │ │ ├── Mono.CecilX.Pdb.dll
│ │ │ ├── Mono.CecilX.Pdb.dll.meta
│ │ │ ├── Mono.CecilX.Rocks.dll
│ │ │ ├── Mono.CecilX.Rocks.dll.meta
│ │ │ ├── Mono.CecilX.dll
│ │ │ └── Mono.CecilX.dll.meta
│ ├── Readme.txt
│ ├── Readme.txt.meta
│ ├── Runtime.meta
│ ├── Runtime
│ │ ├── AssemblyInfo.cs
│ │ ├── AssemblyInfo.cs.meta
│ │ ├── ClientScene.cs
│ │ ├── ClientScene.cs.meta
│ │ ├── Compression.cs
│ │ ├── Compression.cs.meta
│ │ ├── CustomAttributes.cs
│ │ ├── CustomAttributes.cs.meta
│ │ ├── DotNetCompatibility.cs
│ │ ├── DotNetCompatibility.cs.meta
│ │ ├── ExponentialMovingAverage.cs
│ │ ├── ExponentialMovingAverage.cs.meta
│ │ ├── FloatBytePacker.cs
│ │ ├── FloatBytePacker.cs.meta
│ │ ├── LocalConnections.cs
│ │ ├── LocalConnections.cs.meta
│ │ ├── LogFactory.cs
│ │ ├── LogFactory.cs.meta
│ │ ├── LogFilter.cs
│ │ ├── LogFilter.cs.meta
│ │ ├── Logging.meta
│ │ ├── Logging
│ │ │ ├── ConsoleColorLogHandler.cs
│ │ │ ├── ConsoleColorLogHandler.cs.meta
│ │ │ ├── EditorLogSettingsLoader.cs
│ │ │ ├── EditorLogSettingsLoader.cs.meta
│ │ │ ├── LogFactory.cs
│ │ │ ├── LogFactory.cs.meta
│ │ │ ├── LogSettings.cs
│ │ │ ├── LogSettings.cs.meta
│ │ │ ├── NetworkHeadlessLogger.cs
│ │ │ ├── NetworkHeadlessLogger.cs.meta
│ │ │ ├── NetworkLogSettings.cs
│ │ │ └── NetworkLogSettings.cs.meta
│ │ ├── MessagePacker.cs
│ │ ├── MessagePacker.cs.meta
│ │ ├── Messages.cs
│ │ ├── Messages.cs.meta
│ │ ├── Mirror.asmdef
│ │ ├── Mirror.asmdef.meta
│ │ ├── NetworkAuthenticator.cs
│ │ ├── NetworkAuthenticator.cs.meta
│ │ ├── NetworkBehaviour.cs
│ │ ├── NetworkBehaviour.cs.meta
│ │ ├── NetworkClient.cs
│ │ ├── NetworkClient.cs.meta
│ │ ├── NetworkConnection.cs
│ │ ├── NetworkConnection.cs.meta
│ │ ├── NetworkConnectionToClient.cs
│ │ ├── NetworkConnectionToClient.cs.meta
│ │ ├── NetworkConnectionToServer.cs
│ │ ├── NetworkConnectionToServer.cs.meta
│ │ ├── NetworkDiagnostics.cs
│ │ ├── NetworkDiagnostics.cs.meta
│ │ ├── NetworkIdentity.cs
│ │ ├── NetworkIdentity.cs.meta
│ │ ├── NetworkManager.cs
│ │ ├── NetworkManager.cs.meta
│ │ ├── NetworkManagerHUD.cs
│ │ ├── NetworkManagerHUD.cs.meta
│ │ ├── NetworkMessage.cs
│ │ ├── NetworkMessage.cs.meta
│ │ ├── NetworkReader.cs
│ │ ├── NetworkReader.cs.meta
│ │ ├── NetworkReaderPool.cs
│ │ ├── NetworkReaderPool.cs.meta
│ │ ├── NetworkServer.cs
│ │ ├── NetworkServer.cs.meta
│ │ ├── NetworkStartPosition.cs
│ │ ├── NetworkStartPosition.cs.meta
│ │ ├── NetworkTime.cs
│ │ ├── NetworkTime.cs.meta
│ │ ├── NetworkVisibility.cs
│ │ ├── NetworkVisibility.cs.meta
│ │ ├── NetworkWriter.cs
│ │ ├── NetworkWriter.cs.meta
│ │ ├── NetworkWriterPool.cs
│ │ ├── NetworkWriterPool.cs.meta
│ │ ├── Pool.cs
│ │ ├── Pool.cs.meta
│ │ ├── RemoteCallHelper.cs
│ │ ├── RemoteCallHelper.cs.meta
│ │ ├── StringHash.cs
│ │ ├── StringHash.cs.meta
│ │ ├── SyncDictionary.cs
│ │ ├── SyncDictionary.cs.meta
│ │ ├── SyncList.cs
│ │ ├── SyncList.cs.meta
│ │ ├── SyncObject.cs
│ │ ├── SyncObject.cs.meta
│ │ ├── SyncSet.cs
│ │ ├── SyncSet.cs.meta
│ │ ├── Transport.meta
│ │ ├── Transport
│ │ │ ├── FallbackTransport.cs
│ │ │ ├── FallbackTransport.cs.meta
│ │ │ ├── KCP.meta
│ │ │ ├── KCP
│ │ │ │ ├── MirrorTransport.meta
│ │ │ │ ├── MirrorTransport
│ │ │ │ │ ├── KcpTransport.cs
│ │ │ │ │ └── KcpTransport.cs.meta
│ │ │ │ ├── kcp2k.meta
│ │ │ │ └── kcp2k
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── LICENSE.meta
│ │ │ │ │ ├── VERSION
│ │ │ │ │ ├── VERSION.meta
│ │ │ │ │ ├── highlevel.meta
│ │ │ │ │ ├── highlevel
│ │ │ │ │ ├── KcpChannel.cs
│ │ │ │ │ ├── KcpChannel.cs.meta
│ │ │ │ │ ├── KcpClient.cs
│ │ │ │ │ ├── KcpClient.cs.meta
│ │ │ │ │ ├── KcpClientConnection.cs
│ │ │ │ │ ├── KcpClientConnection.cs.meta
│ │ │ │ │ ├── KcpConnection.cs
│ │ │ │ │ ├── KcpConnection.cs.meta
│ │ │ │ │ ├── KcpHeader.cs
│ │ │ │ │ ├── KcpHeader.cs.meta
│ │ │ │ │ ├── KcpServer.cs
│ │ │ │ │ ├── KcpServer.cs.meta
│ │ │ │ │ ├── KcpServerConnection.cs
│ │ │ │ │ ├── KcpServerConnection.cs.meta
│ │ │ │ │ ├── Log.cs
│ │ │ │ │ └── Log.cs.meta
│ │ │ │ │ ├── kcp.meta
│ │ │ │ │ ├── kcp
│ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ ├── AssemblyInfo.cs.meta
│ │ │ │ │ ├── Kcp.cs
│ │ │ │ │ ├── Kcp.cs.meta
│ │ │ │ │ ├── Segment.cs
│ │ │ │ │ ├── Segment.cs.meta
│ │ │ │ │ ├── Utils.cs
│ │ │ │ │ └── Utils.cs.meta
│ │ │ │ │ ├── kcp2k.asmdef
│ │ │ │ │ └── kcp2k.asmdef.meta
│ │ │ ├── MiddlewareTransport.cs
│ │ │ ├── MiddlewareTransport.cs.meta
│ │ │ ├── MultiplexTransport.cs
│ │ │ ├── MultiplexTransport.cs.meta
│ │ │ ├── SimpleWebTransport.meta
│ │ │ ├── SimpleWebTransport
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── AssemblyInfo.cs.meta
│ │ │ │ ├── Client.meta
│ │ │ │ ├── Client
│ │ │ │ │ ├── SimpleWebClient.cs
│ │ │ │ │ ├── SimpleWebClient.cs.meta
│ │ │ │ │ ├── StandAlone.meta
│ │ │ │ │ ├── StandAlone
│ │ │ │ │ │ ├── ClientHandshake.cs
│ │ │ │ │ │ ├── ClientHandshake.cs.meta
│ │ │ │ │ │ ├── ClientSslHelper.cs
│ │ │ │ │ │ ├── ClientSslHelper.cs.meta
│ │ │ │ │ │ ├── WebSocketClientStandAlone.cs
│ │ │ │ │ │ └── WebSocketClientStandAlone.cs.meta
│ │ │ │ │ ├── Webgl.meta
│ │ │ │ │ └── Webgl
│ │ │ │ │ │ ├── SimpleWebJSLib.cs
│ │ │ │ │ │ ├── SimpleWebJSLib.cs.meta
│ │ │ │ │ │ ├── WebSocketClientWebGl.cs
│ │ │ │ │ │ ├── WebSocketClientWebGl.cs.meta
│ │ │ │ │ │ ├── plugin.meta
│ │ │ │ │ │ └── plugin
│ │ │ │ │ │ ├── SimpleWeb.jslib
│ │ │ │ │ │ └── SimpleWeb.jslib.meta
│ │ │ │ ├── Common.meta
│ │ │ │ ├── Common
│ │ │ │ │ ├── BufferPool.cs
│ │ │ │ │ ├── BufferPool.cs.meta
│ │ │ │ │ ├── Connection.cs
│ │ │ │ │ ├── Connection.cs.meta
│ │ │ │ │ ├── Constants.cs
│ │ │ │ │ ├── Constants.cs.meta
│ │ │ │ │ ├── EventType.cs
│ │ │ │ │ ├── EventType.cs.meta
│ │ │ │ │ ├── Log.cs
│ │ │ │ │ ├── Log.cs.meta
│ │ │ │ │ ├── Message.cs
│ │ │ │ │ ├── Message.cs.meta
│ │ │ │ │ ├── MessageProcessor.cs
│ │ │ │ │ ├── MessageProcessor.cs.meta
│ │ │ │ │ ├── ReadHelper.cs
│ │ │ │ │ ├── ReadHelper.cs.meta
│ │ │ │ │ ├── ReceiveLoop.cs
│ │ │ │ │ ├── ReceiveLoop.cs.meta
│ │ │ │ │ ├── SendLoop.cs
│ │ │ │ │ ├── SendLoop.cs.meta
│ │ │ │ │ ├── TcpConfig.cs
│ │ │ │ │ ├── TcpConfig.cs.meta
│ │ │ │ │ ├── Utils.cs
│ │ │ │ │ └── Utils.cs.meta
│ │ │ │ ├── README.txt
│ │ │ │ ├── README.txt.meta
│ │ │ │ ├── Server.meta
│ │ │ │ ├── Server
│ │ │ │ │ ├── ServerHandshake.cs
│ │ │ │ │ ├── ServerHandshake.cs.meta
│ │ │ │ │ ├── ServerSslHelper.cs
│ │ │ │ │ ├── ServerSslHelper.cs.meta
│ │ │ │ │ ├── SimpleWebServer.cs
│ │ │ │ │ ├── SimpleWebServer.cs.meta
│ │ │ │ │ ├── WebSocketServer.cs
│ │ │ │ │ └── WebSocketServer.cs.meta
│ │ │ │ ├── SimpleWebTransport.asmdef
│ │ │ │ ├── SimpleWebTransport.asmdef.meta
│ │ │ │ ├── SimpleWebTransport.cs
│ │ │ │ ├── SimpleWebTransport.cs.meta
│ │ │ │ ├── SslConfigLoader.cs
│ │ │ │ └── SslConfigLoader.cs.meta
│ │ │ ├── Telepathy.meta
│ │ │ ├── Telepathy
│ │ │ │ ├── Client.cs
│ │ │ │ ├── Client.cs.meta
│ │ │ │ ├── Common.cs
│ │ │ │ ├── Common.cs.meta
│ │ │ │ ├── ConnectionState.cs
│ │ │ │ ├── ConnectionState.cs.meta
│ │ │ │ ├── EventType.cs
│ │ │ │ ├── EventType.cs.meta
│ │ │ │ ├── LICENSE
│ │ │ │ ├── LICENSE.meta
│ │ │ │ ├── Log.cs
│ │ │ │ ├── Log.cs.meta
│ │ │ │ ├── Logger.cs
│ │ │ │ ├── Logger.cs.meta
│ │ │ │ ├── MagnificentReceivePipe.cs
│ │ │ │ ├── MagnificentReceivePipe.cs.meta
│ │ │ │ ├── MagnificentSendPipe.cs
│ │ │ │ ├── MagnificentSendPipe.cs.meta
│ │ │ │ ├── Message.cs
│ │ │ │ ├── Message.cs.meta
│ │ │ │ ├── NetworkStreamExtensions.cs
│ │ │ │ ├── NetworkStreamExtensions.cs.meta
│ │ │ │ ├── Pool.cs
│ │ │ │ ├── Pool.cs.meta
│ │ │ │ ├── SafeQueue.cs
│ │ │ │ ├── SafeQueue.cs.meta
│ │ │ │ ├── Server.cs
│ │ │ │ ├── Server.cs.meta
│ │ │ │ ├── Telepathy.asmdef
│ │ │ │ ├── Telepathy.asmdef.meta
│ │ │ │ ├── ThreadExtensions.cs
│ │ │ │ ├── ThreadExtensions.cs.meta
│ │ │ │ ├── ThreadFunctions.cs
│ │ │ │ ├── ThreadFunctions.cs.meta
│ │ │ │ ├── Utils.cs
│ │ │ │ ├── Utils.cs.meta
│ │ │ │ ├── VERSION
│ │ │ │ └── VERSION.meta
│ │ │ ├── TelepathyTransport.cs
│ │ │ ├── TelepathyTransport.cs.meta
│ │ │ ├── Transport.cs
│ │ │ └── Transport.cs.meta
│ │ ├── UNetwork.cs
│ │ └── UNetwork.cs.meta
│ ├── Version.txt
│ └── Version.txt.meta
├── Plugins.meta
├── Plugins
│ ├── GameLiftServerSDKNet45.dll
│ ├── GameLiftServerSDKNet45.dll.meta
│ ├── Google.Protobuf.dll
│ ├── Google.Protobuf.dll.meta
│ ├── Newtonsoft.Json.dll
│ ├── Newtonsoft.Json.dll.meta
│ ├── System.Buffers.dll
│ ├── System.Buffers.dll.meta
│ ├── System.Collections.Immutable.dll
│ ├── System.Collections.Immutable.dll.meta
│ ├── System.Memory.dll
│ ├── System.Memory.dll.meta
│ ├── System.Runtime.CompilerServices.Unsafe.dll
│ ├── System.Runtime.CompilerServices.Unsafe.dll.meta
│ ├── log4net.dll
│ ├── log4net.dll.meta
│ ├── websocket-sharp.dll
│ └── websocket-sharp.dll.meta
├── Scenes.meta
├── Scenes
│ ├── SampleScene.unity
│ └── SampleScene.unity.meta
├── Scripts.meta
└── Scripts
│ ├── BADNetworkMessage.cs
│ ├── BADNetworkMessage.cs.meta
│ ├── BADNetworkServer.cs
│ ├── BADNetworkServer.cs.meta
│ ├── GameLiftServer.cs
│ ├── GameLiftServer.cs.meta
│ ├── Startup.cs
│ └── Startup.cs.meta
├── LICENSE
├── Packages
├── manifest.json
└── packages-lock.json
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── PackageManagerSettings.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
├── UnityConnectSettings.asset
├── VFXManager.asset
├── VersionControlSettings.asset
└── XRSettings.asset
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # This .gitignore file should be placed at the root of your Unity project directory
5 | #
6 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
7 | #
8 | /[Ll]ibrary/
9 | /[Tt]emp/
10 | /[Oo]bj/
11 | /[Bb]uild/
12 | /[Bb]uilds/
13 | /[Ll]ogs/
14 | /[Uu]ser[Ss]ettings/
15 | /dist/
16 |
17 | # MemoryCaptures can get excessive in size.
18 | # They also could contain extremely sensitive data
19 | /[Mm]emoryCaptures/
20 |
21 | # Asset meta data should only be ignored when the corresponding asset is also ignored
22 | !/[Aa]ssets/**/*.meta
23 |
24 | # Uncomment this line if you wish to ignore the asset store tools plugin
25 | # /[Aa]ssets/AssetStoreTools*
26 |
27 | # Autogenerated Jetbrains Rider plugin
28 | /[Aa]ssets/Plugins/Editor/JetBrains*
29 |
30 | # Visual Studio cache directory
31 | .vs/
32 |
33 | # Gradle cache directory
34 | .gradle/
35 |
36 | # Autogenerated VS/MD/Consulo solution and project files
37 | ExportedObj/
38 | .consulo/
39 | *.csproj
40 | *.unityproj
41 | *.sln
42 | *.suo
43 | *.tmp
44 | *.user
45 | *.userprefs
46 | *.pidb
47 | *.booproj
48 | *.svd
49 | *.pdb
50 | *.mdb
51 | *.opendb
52 | *.VC.db
53 |
54 | # Unity3D generated meta files
55 | *.pidb.meta
56 | *.pdb.meta
57 | *.mdb.meta
58 |
59 | # Unity3D generated file on crash reports
60 | sysinfo.txt
61 |
62 | # Builds
63 | *.apk
64 | *.aab
65 | *.unitypackage
66 |
67 | # Crashlytics generated file
68 | crashlytics-build.properties
69 |
70 | # Packed Addressables
71 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
72 |
73 | # Temporary auto-generated Android Assets
74 | /[Aa]ssets/[Ss]treamingAssets/aa.meta
75 | /[Aa]ssets/[Ss]treamingAssets/aa/*
76 |
77 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.exclude":
3 | {
4 | "**/.DS_Store":true,
5 | "**/.git":true,
6 | "**/.gitignore":true,
7 | "**/.gitmodules":true,
8 | "**/*.booproj":true,
9 | "**/*.pidb":true,
10 | "**/*.suo":true,
11 | "**/*.user":true,
12 | "**/*.userprefs":true,
13 | "**/*.unityproj":true,
14 | "**/*.dll":true,
15 | "**/*.exe":true,
16 | "**/*.pdf":true,
17 | "**/*.mid":true,
18 | "**/*.midi":true,
19 | "**/*.wav":true,
20 | "**/*.gif":true,
21 | "**/*.ico":true,
22 | "**/*.jpg":true,
23 | "**/*.jpeg":true,
24 | "**/*.png":true,
25 | "**/*.psd":true,
26 | "**/*.tga":true,
27 | "**/*.tif":true,
28 | "**/*.tiff":true,
29 | "**/*.3ds":true,
30 | "**/*.3DS":true,
31 | "**/*.fbx":true,
32 | "**/*.FBX":true,
33 | "**/*.lxo":true,
34 | "**/*.LXO":true,
35 | "**/*.ma":true,
36 | "**/*.MA":true,
37 | "**/*.obj":true,
38 | "**/*.OBJ":true,
39 | "**/*.asset":true,
40 | "**/*.cubemap":true,
41 | "**/*.flare":true,
42 | "**/*.mat":true,
43 | "**/*.meta":true,
44 | "**/*.prefab":true,
45 | "**/*.unity":true,
46 | "build/":true,
47 | "Build/":true,
48 | "Library/":true,
49 | "library/":true,
50 | "obj/":true,
51 | "Obj/":true,
52 | "ProjectSettings/":true,
53 | "temp/":true,
54 | "Temp/":true
55 | }
56 | }
--------------------------------------------------------------------------------
/Assets/Mirror.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5cf8eb36be0834b3da408c694a41cb88
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/CompilerSymbols.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1f8b918bcd89f5c488b06f5574f34760
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Mirror.CompilerSymbols",
3 | "references": [],
4 | "optionalUnityReferences": [],
5 | "includePlatforms": [
6 | "Editor"
7 | ],
8 | "excludePlatforms": [],
9 | "allowUnsafeCode": false,
10 | "overrideReferences": false,
11 | "precompiledReferences": [],
12 | "autoReferenced": true,
13 | "defineConstraints": []
14 | }
--------------------------------------------------------------------------------
/Assets/Mirror/CompilerSymbols/Mirror.CompilerSymbols.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 325984b52e4128546bc7558552f8b1d2
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEditor;
3 |
4 | namespace Mirror
5 | {
6 | static class PreprocessorDefine
7 | {
8 | ///
9 | /// Add define symbols as soon as Unity gets done compiling.
10 | ///
11 | [InitializeOnLoadMethod]
12 | public static void AddDefineSymbols()
13 | {
14 | string currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
15 | HashSet defines = new HashSet(currentDefines.Split(';'))
16 | {
17 | "MIRROR",
18 | "MIRROR_1726_OR_NEWER",
19 | "MIRROR_3_0_OR_NEWER",
20 | "MIRROR_3_12_OR_NEWER",
21 | "MIRROR_4_0_OR_NEWER",
22 | "MIRROR_5_0_OR_NEWER",
23 | "MIRROR_6_0_OR_NEWER",
24 | "MIRROR_7_0_OR_NEWER",
25 | "MIRROR_8_0_OR_NEWER",
26 | "MIRROR_9_0_OR_NEWER",
27 | "MIRROR_10_0_OR_NEWER",
28 | "MIRROR_11_0_OR_NEWER",
29 | "MIRROR_12_0_OR_NEWER",
30 | "MIRROR_13_0_OR_NEWER",
31 | "MIRROR_14_0_OR_NEWER",
32 | "MIRROR_15_0_OR_NEWER",
33 | "MIRROR_16_0_OR_NEWER",
34 | "MIRROR_17_0_OR_NEWER",
35 | "MIRROR_18_0_OR_NEWER",
36 | "MIRROR_24_0_OR_NEWER",
37 | "MIRROR_26_0_OR_NEWER",
38 | "MIRROR_27_0_OR_NEWER",
39 | "MIRROR_28_0_OR_NEWER",
40 | "MIRROR_29_0_OR_NEWER",
41 | "MIRROR_30_0_OR_NEWER",
42 | "MIRROR_30_5_2_OR_NEWER"
43 | };
44 |
45 | // only touch PlayerSettings if we actually modified it.
46 | // otherwise it shows up as changed in git each time.
47 | string newDefines = string.Join(";", defines);
48 | if (newDefines != currentDefines)
49 | {
50 | PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, newDefines);
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f1d66fe74ec6f42dd974cba37d25d453
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9bee879fbc8ef4b1a9a9f7088bfbf726
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Discovery.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b5dcf9618f5e14a4eb60bff5480284a6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Discovery/NetworkDiscovery.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c761308e733c51245b2e8bb4201f46dc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Discovery/NetworkDiscoveryBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b9971d60ce61f4e39b07cd9e7e0c68fa
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 88c37d3deca7a834d80cfd8d3cfcc510
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Discovery/ServerRequest.cs:
--------------------------------------------------------------------------------
1 | namespace Mirror.Discovery
2 | {
3 | public struct ServerRequest : NetworkMessage { }
4 | }
5 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Discovery/ServerRequest.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ea7254bf7b9454da4adad881d94cd141
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Discovery/ServerResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace Mirror.Discovery
5 | {
6 | public struct ServerResponse : NetworkMessage
7 | {
8 | // The server that sent this
9 | // this is a property so that it is not serialized, but the
10 | // client fills this up after we receive it
11 | public IPEndPoint EndPoint { get; set; }
12 |
13 | public Uri uri;
14 |
15 | // Prevent duplicate server appearance when a connection can be made via LAN on multiple NICs
16 | public long serverId;
17 | }
18 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Discovery/ServerResponse.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 36f97227fdf2d7a4e902db5bfc43039c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bfbf2a1f2b300c5489dcab219ef2846e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental/NetworkLerpRigidbody.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7f032128052c95a46afb0ddd97d994cc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental/NetworkRigidbody.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 83392ae5c1b731446909f252fd494ae4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental/NetworkRigidbody2D.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab2cbc52526ea384ba280d13cd1a57b9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental/NetworkTransform.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Mirror.Experimental
4 | {
5 | [DisallowMultipleComponent]
6 | [AddComponentMenu("Network/Experimental/NetworkTransformExperimental")]
7 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkTransform.html")]
8 | public class NetworkTransform : NetworkTransformBase
9 | {
10 | protected override Transform targetTransform => transform;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental/NetworkTransform.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 741bbe11f5357b44593b15c0d11b16bd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental/NetworkTransformBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ea7c690c4fbf8c4439726f4c62eda6d3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental/NetworkTransformChild.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Mirror.Experimental
4 | {
5 | ///
6 | /// A component to synchronize the position of child transforms of networked objects.
7 | /// There must be a NetworkTransform on the root object of the hierarchy. There can be multiple NetworkTransformChild components on an object. This does not use physics for synchronization, it simply synchronizes the localPosition and localRotation of the child transform and lerps towards the received values.
8 | ///
9 | [AddComponentMenu("Network/Experimental/NetworkTransformChildExperimentalExperimental")]
10 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkTransformChild.html")]
11 | public class NetworkTransformChild : NetworkTransformBase
12 | {
13 | [Header("Target")]
14 | public Transform target;
15 |
16 | protected override Transform targetTransform => target;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Experimental/NetworkTransformChild.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f65214da13a861f4a8ae309d3daea1c6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Mirror.Components.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Mirror.Components",
3 | "references": [
4 | "Mirror"
5 | ],
6 | "optionalUnityReferences": [],
7 | "includePlatforms": [],
8 | "excludePlatforms": [],
9 | "allowUnsafeCode": false,
10 | "overrideReferences": false,
11 | "precompiledReferences": [],
12 | "autoReferenced": true,
13 | "defineConstraints": []
14 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Components/Mirror.Components.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 72872094b21c16e48b631b2224833d49
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkAnimator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7f6f3bf89aa97405989c802ba270f815
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkLobbyManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Mirror
5 | {
6 | ///
7 | /// This is a specialized NetworkManager that includes a networked lobby.
8 | ///
9 | ///
10 | /// The lobby has slots that track the joined players, and a maximum player count that is enforced. It requires that the NetworkLobbyPlayer component be on the lobby player objects.
11 | /// NetworkLobbyManager is derived from NetworkManager, and so it implements many of the virtual functions provided by the NetworkManager class. To avoid accidentally replacing functionality of the NetworkLobbyManager, there are new virtual functions on the NetworkLobbyManager that begin with "OnLobby". These should be used on classes derived from NetworkLobbyManager instead of the virtual functions on NetworkManager.
12 | /// The OnLobby*() functions have empty implementations on the NetworkLobbyManager base class, so the base class functions do not have to be called.
13 | ///
14 | [AddComponentMenu("Network/NetworkLobbyManager")]
15 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkRoomManager.html")]
16 | [Obsolete("Use / inherit from NetworkRoomManager instead")]
17 | public class NetworkLobbyManager : NetworkRoomManager { }
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkLobbyManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4c96e6dd99826849ab1431f94547141
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkLobbyPlayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Mirror
5 | {
6 | ///
7 | /// This component works in conjunction with the NetworkLobbyManager to make up the multiplayer lobby system.
8 | /// The LobbyPrefab object of the NetworkLobbyManager must have this component on it. This component holds basic lobby player data required for the lobby to function. Game specific data for lobby players can be put in other components on the LobbyPrefab or in scripts derived from NetworkLobbyPlayer.
9 | ///
10 | [DisallowMultipleComponent]
11 | [AddComponentMenu("Network/NetworkLobbyPlayer")]
12 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkRoomPlayer.html")]
13 | [Obsolete("Use / inherit from NetworkRoomPlayer instead")]
14 | public class NetworkLobbyPlayer : NetworkRoomPlayer { }
15 | }
16 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkLobbyPlayer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 777a368af85f2e84da7ea5666581921b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkMatchChecker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1020a74962faada4b807ac5dc053a4cf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkOwnerChecker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 25fd0c51bbe07c140bc30978b91e9182
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkPingDisplay.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Mirror
4 | {
5 | ///
6 | /// Component that will display the clients ping in milliseconds
7 | ///
8 | [DisallowMultipleComponent]
9 | [AddComponentMenu("Network/NetworkPingDisplay")]
10 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkPingDisplay.html")]
11 | public class NetworkPingDisplay : MonoBehaviour
12 | {
13 | public bool showPing = true;
14 | [Tooltip("True shows the round trip time, from origin to destination, then back again. Set to false for time to server only.")]
15 | public bool showRoundTripTime = true;
16 | private int rttMultiplier = 1;
17 | public Vector2 position = new Vector2(200, 0);
18 | public int fontSize = 24;
19 | public Color textColor = new Color32(255, 255, 255, 80);
20 | public string format = "{0}ms";
21 |
22 | GUIStyle style;
23 |
24 | void Awake()
25 | {
26 | style = new GUIStyle();
27 | style.alignment = TextAnchor.UpperLeft;
28 | style.fontSize = fontSize;
29 | style.normal.textColor = textColor;
30 | }
31 |
32 | void OnGUI()
33 | {
34 | if (!showPing) { return; }
35 | if (showRoundTripTime) { rttMultiplier = 1; } else { rttMultiplier = 2; }
36 |
37 | string text = string.Format(format, (int)((NetworkTime.rtt / rttMultiplier) * 1000));
38 |
39 | // leave here or create special method to update fontSize and textColor
40 | style.fontSize = fontSize;
41 | style.normal.textColor = textColor;
42 |
43 | int width = Screen.width;
44 | int height = Screen.height;
45 | Rect rect = new Rect(position.x, position.y, width - 200, height * 2 / 100);
46 |
47 | GUI.Label(rect, text, style);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkPingDisplay.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc654f29862fc2643b948f772ebb9e68
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkProximityChecker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1731d8de2d0c84333b08ebe1e79f4118
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkRoomManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 615e6c6589cf9e54cad646b5a11e0529
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkRoomPlayer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 79874ac94d5b1314788ecf0e86bd23fd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkSceneChecker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b7fdb599e1359924bad6255660370252
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkTransform.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Mirror
4 | {
5 | [DisallowMultipleComponent]
6 | [AddComponentMenu("Network/NetworkTransform")]
7 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkTransform.html")]
8 | public class NetworkTransform : NetworkTransformBase
9 | {
10 | protected override Transform targetComponent => transform;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkTransform.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2f74aedd71d9a4f55b3ce499326d45fb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkTransformBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2e77294d8ccbc4e7cb8ca2bd0d3e99ea
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkTransformChild.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Mirror
4 | {
5 | ///
6 | /// A component to synchronize the position of child transforms of networked objects.
7 | /// There must be a NetworkTransform on the root object of the hierarchy. There can be multiple NetworkTransformChild components on an object. This does not use physics for synchronization, it simply synchronizes the localPosition and localRotation of the child transform and lerps towards the received values.
8 | ///
9 | [AddComponentMenu("Network/NetworkTransformChild")]
10 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkTransformChild.html")]
11 | public class NetworkTransformChild : NetworkTransformBase
12 | {
13 | [Header("Target")]
14 | public Transform target;
15 |
16 | protected override Transform targetComponent => target;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/Mirror/Components/NetworkTransformChild.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 734b48bea0b204338958ee3d885e11f0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2539267b6934a4026a505690a1e1eda2
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/EditorHelper.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using UnityEditor;
3 | using UnityEngine;
4 |
5 | namespace Mirror
6 | {
7 | public static class EditorHelper
8 | {
9 | public static string FindPath()
10 | {
11 | string typeName = typeof(T).Name;
12 |
13 | string[] guidsFound = AssetDatabase.FindAssets($"t:Script " + typeName);
14 | if (guidsFound.Length >= 1 && !string.IsNullOrEmpty(guidsFound[0]))
15 | {
16 | if (guidsFound.Length > 1)
17 | {
18 | Debug.LogWarning($"Found more than one{typeName}");
19 | }
20 |
21 | string path = AssetDatabase.GUIDToAssetPath(guidsFound[0]);
22 | return Path.GetDirectoryName(path);
23 | }
24 | else
25 | {
26 | Debug.LogError($"Could not find path of {typeName}");
27 | return string.Empty;
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/EditorHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dba787f167ff29c4288532af1ec3584c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/EnterPlayModeSettingsCheck.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b15a0d2ca0909400eb53dd6fe894cddd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/InspectorHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 047c894c2a5ccc1438b7e59302f62744
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/LogLevelWindow.cs:
--------------------------------------------------------------------------------
1 | // File moved to Mirror/Editor/Logging/LogLevelWindow.cs
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/LogLevelWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f28def2148ed5194abe70af012a4e3e0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Logging.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4d97731cd74ac8b4b8aad808548ef9cd
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Logging/LogLevelWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c3dbf48190d77d243b87962a82c3b164
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Logging/LogLevelsGUI.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9d6ce9d62a2d2ec4d8cef8a0d22b8dd2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Logging/LogSettingsEditor.cs:
--------------------------------------------------------------------------------
1 | using Mirror.Logging;
2 | using UnityEditor;
3 | using UnityEngine;
4 |
5 | namespace Mirror.EditorScripts.Logging
6 | {
7 | [CustomEditor(typeof(LogSettings))]
8 | public class LogSettingsEditor : Editor
9 | {
10 | public override void OnInspectorGUI()
11 | {
12 | CurrentScriptField();
13 |
14 | LogLevelsGUI.DrawLogFactoryDictionary(target as LogSettings);
15 | }
16 |
17 | public void CurrentScriptField()
18 | {
19 | GUI.enabled = false;
20 | EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Script"));
21 | GUI.enabled = true;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Logging/LogSettingsEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8f4ecb3d81ce9ff44b91f311ee46d4ea
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Logging/NetworkLogSettingsEditor.cs:
--------------------------------------------------------------------------------
1 | using Mirror.Logging;
2 | using UnityEditor;
3 |
4 | namespace Mirror.EditorScripts.Logging
5 | {
6 | [CustomEditor(typeof(NetworkLogSettings))]
7 | public class NetworkLogSettingsEditor : Editor
8 | {
9 | public override void OnInspectorGUI()
10 | {
11 | DrawDefaultInspector();
12 |
13 | NetworkLogSettings target = this.target as NetworkLogSettings;
14 |
15 | if (target.settings == null)
16 | {
17 | LogSettings newSettings = LogLevelsGUI.DrawCreateNewButton();
18 | if (newSettings != null)
19 | {
20 | SerializedProperty settingsProp = serializedObject.FindProperty("settings");
21 | settingsProp.objectReferenceValue = newSettings;
22 | serializedObject.ApplyModifiedProperties();
23 | }
24 | }
25 | else
26 | {
27 | LogLevelsGUI.DrawLogFactoryDictionary(target.settings);
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Logging/NetworkLogSettingsEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 37fb96d5bbf965d47acfc5c8589a1b71
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Mirror.Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Mirror.Editor",
3 | "references": [
4 | "Mirror",
5 | "Mirror.Weaver"
6 | ],
7 | "optionalUnityReferences": [],
8 | "includePlatforms": [
9 | "Editor"
10 | ],
11 | "excludePlatforms": [],
12 | "allowUnsafeCode": false,
13 | "overrideReferences": false,
14 | "precompiledReferences": [],
15 | "autoReferenced": true,
16 | "defineConstraints": []
17 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Mirror.Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c7c33eb5480dd24c9e29a8250c1a775
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/NetworkBehaviourInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f02853db46b6346e4866594a96c3b0e7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/NetworkInformationPreview.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 51a99294efe134232932c34606737356
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/NetworkManagerEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 519712eb07f7a44039df57664811c2c5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/NetworkScenePostProcess.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a3ec1c414d821444a9e77f18a2c130ea
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/SceneDrawer.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEngine;
3 |
4 | namespace Mirror
5 | {
6 | [CustomPropertyDrawer(typeof(SceneAttribute))]
7 | public class SceneDrawer : PropertyDrawer
8 | {
9 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
10 | {
11 | if (property.propertyType == SerializedPropertyType.String)
12 | {
13 | SceneAsset sceneObject = AssetDatabase.LoadAssetAtPath(property.stringValue);
14 |
15 | if (sceneObject == null && !string.IsNullOrEmpty(property.stringValue))
16 | {
17 | // try to load it from the build settings for legacy compatibility
18 | sceneObject = GetBuildSettingsSceneObject(property.stringValue);
19 | }
20 | if (sceneObject == null && !string.IsNullOrEmpty(property.stringValue))
21 | {
22 | Debug.LogError($"Could not find scene {property.stringValue} in {property.propertyPath}, assign the proper scenes in your NetworkManager");
23 | }
24 | SceneAsset scene = (SceneAsset)EditorGUI.ObjectField(position, label, sceneObject, typeof(SceneAsset), true);
25 |
26 | property.stringValue = AssetDatabase.GetAssetPath(scene);
27 | }
28 | else
29 | {
30 | EditorGUI.LabelField(position, label.text, "Use [Scene] with strings.");
31 | }
32 | }
33 |
34 | protected SceneAsset GetBuildSettingsSceneObject(string sceneName)
35 | {
36 | foreach (EditorBuildSettingsScene buildScene in EditorBuildSettings.scenes)
37 | {
38 | SceneAsset sceneAsset = AssetDatabase.LoadAssetAtPath(buildScene.path);
39 | if (sceneAsset.name == sceneName)
40 | {
41 | return sceneAsset;
42 | }
43 | }
44 | return null;
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/SceneDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b24704a46211b4ea294aba8f58715cea
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/ScriptableObjectUtility.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEngine;
3 |
4 | namespace Mirror.EditorScripts
5 | {
6 | public static class ScriptableObjectUtility
7 | {
8 | const string DefaultMirrorFolder = "Assets/Mirror/";
9 |
10 | [System.Obsolete("Use CreateAsset(string defaultName, string defaultFolder) instead")]
11 | public static T CreateAsset(string defaultName) where T : ScriptableObject
12 | => CreateAsset(defaultName, DefaultMirrorFolder);
13 |
14 | ///
15 | /// This makes it easy to create, name and place unique new ScriptableObject asset files.
16 | ///
17 | public static T CreateAsset(string defaultName, string defaultFolder) where T : ScriptableObject
18 | {
19 | string path = SavePanel(defaultName, defaultFolder);
20 | // user click cancel
21 | if (string.IsNullOrEmpty(path)) { return null; }
22 |
23 | T asset = ScriptableObject.CreateInstance();
24 |
25 | SaveAsset(path, asset);
26 |
27 | return asset;
28 | }
29 |
30 | static string SavePanel(string name, string defaultFolder)
31 | {
32 | string path = EditorUtility.SaveFilePanel(
33 | "Save ScriptableObject",
34 | defaultFolder,
35 | name + ".asset",
36 | "asset");
37 |
38 | // user click cancel, return early
39 | if (string.IsNullOrEmpty(path)) { return path; }
40 |
41 | // Unity only wants path from Assets
42 | if (path.StartsWith(Application.dataPath))
43 | {
44 | path = "Assets" + path.Substring(Application.dataPath.Length);
45 | }
46 |
47 | return path;
48 | }
49 |
50 | static void SaveAsset(string path, ScriptableObject asset)
51 | {
52 | string assetPathAndName = AssetDatabase.GenerateUniqueAssetPath(path);
53 |
54 | AssetDatabase.CreateAsset(asset, assetPathAndName);
55 |
56 | AssetDatabase.SaveAssets();
57 | AssetDatabase.Refresh();
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/ScriptableObjectUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4d54a29ddd5b52b4eaa07ed39c0e3e83
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/SyncVarAttributeDrawer.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEngine;
3 |
4 | namespace Mirror
5 | {
6 | [CustomPropertyDrawer(typeof(SyncVarAttribute))]
7 | public class SyncVarAttributeDrawer : PropertyDrawer
8 | {
9 | static readonly GUIContent syncVarIndicatorContent = new GUIContent("SyncVar", "This variable has been marked with the [SyncVar] attribute.");
10 |
11 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
12 | {
13 | Vector2 syncVarIndicatorRect = EditorStyles.miniLabel.CalcSize(syncVarIndicatorContent);
14 | float valueWidth = position.width - syncVarIndicatorRect.x;
15 |
16 | Rect valueRect = new Rect(position.x, position.y, valueWidth, position.height);
17 | Rect labelRect = new Rect(position.x + valueWidth, position.y, syncVarIndicatorRect.x, position.height);
18 |
19 | EditorGUI.PropertyField(valueRect, property, true);
20 | GUI.Label(labelRect, syncVarIndicatorContent, EditorStyles.miniLabel);
21 | }
22 |
23 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
24 | {
25 | return EditorGUI.GetPropertyHeight(property);
26 | }
27 | }
28 | } //namespace
29 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/SyncVarAttributeDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 27821afc81c4d064d8348fbeb00c0ce8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d9f8e6274119b4ce29e498cfb8aca8a4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | [assembly: InternalsVisibleTo("Mirror.Tests")]
4 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 929924d95663264478d4238d4910d22e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: de2aeb2e8068f421a9a1febe408f7051
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Extensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 562a5cf0254cc45738e9aa549a7100b2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Helpers.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics;
2 | using System.IO;
3 | using System.Reflection;
4 |
5 | namespace Mirror.Weaver
6 | {
7 | static class Helpers
8 | {
9 | // This code is taken from SerializationWeaver
10 |
11 | public static string UnityEngineDllDirectoryName()
12 | {
13 | string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);
14 | return directoryName?.Replace(@"file:\", "");
15 | }
16 |
17 | public static string DestinationFileFor(string outputDir, string assemblyPath)
18 | {
19 | string fileName = Path.GetFileName(assemblyPath);
20 | Debug.Assert(fileName != null, "fileName != null");
21 |
22 | return Path.Combine(outputDir, fileName);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Helpers.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6c4ed76daf48547c5abb7c58f8d20886
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Log.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mirror.Weaver
4 | {
5 | public static class Log
6 | {
7 | public static Action WarningMethod;
8 | public static Action ErrorMethod;
9 |
10 | public static void Warning(string msg)
11 | {
12 | WarningMethod(msg);
13 | }
14 |
15 | public static void Error(string msg)
16 | {
17 | ErrorMethod(msg);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Log.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a21c60c40a4c4d679c2b71a7c40882e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Mirror.Weaver.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Mirror.Weaver",
3 | "references": [
4 | "Mirror"
5 | ],
6 | "optionalUnityReferences": [],
7 | "includePlatforms": [
8 | "Editor"
9 | ],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": true,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": true,
15 | "defineConstraints": []
16 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Mirror.Weaver.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1d0b9d21c3ff546a4aa32399dfd33474
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e538d627280d2471b8c72fdea822ca49
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73f6c9cdbb9e54f65b3a0a35cc8e55c2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/GenericArgumentResolver.cs:
--------------------------------------------------------------------------------
1 | // Removed Oct 1 2020
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/GenericArgumentResolver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fd67b3f7c2d66074a9bc7a23787e2ffb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs:
--------------------------------------------------------------------------------
1 | // removed Oct 5 2020
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e25c00c88fc134f6ea7ab00ae4db8083
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/MethodProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 661e1af528e3441f79e1552fb5ec4e0e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/MonoBehaviourProcessor.cs:
--------------------------------------------------------------------------------
1 | using Mono.CecilX;
2 |
3 | namespace Mirror.Weaver
4 | {
5 | ///
6 | /// only shows warnings in case we use SyncVars etc. for MonoBehaviour.
7 | ///
8 | static class MonoBehaviourProcessor
9 | {
10 | public static void Process(TypeDefinition td)
11 | {
12 | ProcessSyncVars(td);
13 | ProcessMethods(td);
14 | }
15 |
16 | static void ProcessSyncVars(TypeDefinition td)
17 | {
18 | // find syncvars
19 | foreach (FieldDefinition fd in td.Fields)
20 | {
21 | if (fd.HasCustomAttribute())
22 | Weaver.Error($"SyncVar {fd.Name} must be inside a NetworkBehaviour. {td.Name} is not a NetworkBehaviour", fd);
23 |
24 | if (SyncObjectInitializer.ImplementsSyncObject(fd.FieldType))
25 | {
26 | Weaver.Error($"{fd.Name} is a SyncObject and must be inside a NetworkBehaviour. {td.Name} is not a NetworkBehaviour", fd);
27 | }
28 | }
29 | }
30 |
31 | static void ProcessMethods(TypeDefinition td)
32 | {
33 | // find command and RPC functions
34 | foreach (MethodDefinition md in td.Methods)
35 | {
36 | if (md.HasCustomAttribute())
37 | Weaver.Error($"Command {md.Name} must be declared inside a NetworkBehaviour", md);
38 | if (md.HasCustomAttribute())
39 | Weaver.Error($"ClientRpc {md.Name} must be declared inside a NetworkBehaviour", md);
40 | if (md.HasCustomAttribute())
41 | Weaver.Error($"TargetRpc {md.Name} must be declared inside a NetworkBehaviour", md);
42 | }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/MonoBehaviourProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 35c16722912b64af894e4f6668f2e54c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8118d606be3214e5d99943ec39530dd8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/PropertySiteProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d48f1ab125e9940a995603796bccc59e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f3263602f0a374ecd8d08588b1fc2f76
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a3cb7051ff41947e59bba58bdd2b73fc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/ServerClientAttributeProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 024f251bf693bb345b90b9177892d534
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncDictionaryProcessor.cs:
--------------------------------------------------------------------------------
1 | // Removed Oct 1 2020
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncDictionaryProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 29e4a45f69822462ab0b15adda962a29
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncEventProcessor.cs:
--------------------------------------------------------------------------------
1 | // removed 2020-09
2 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncEventProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a5d8b25543a624384944b599e5a832a8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncListProcessor.cs:
--------------------------------------------------------------------------------
1 | // Removed Oct 1 2020
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncListProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4f3445268e45d437fac325837aff3246
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncObjectInitializer.cs:
--------------------------------------------------------------------------------
1 | using Mono.CecilX;
2 | using Mono.CecilX.Cil;
3 |
4 | namespace Mirror.Weaver
5 | {
6 | public static class SyncObjectInitializer
7 | {
8 | public static void GenerateSyncObjectInitializer(ILProcessor worker, FieldDefinition fd)
9 | {
10 | // register syncobject in network behaviour
11 | GenerateSyncObjectRegistration(worker, fd);
12 | }
13 |
14 | public static bool ImplementsSyncObject(TypeReference typeRef)
15 | {
16 | try
17 | {
18 | // value types cant inherit from SyncObject
19 | if (typeRef.IsValueType)
20 | {
21 | return false;
22 | }
23 |
24 | return typeRef.Resolve().ImplementsInterface();
25 | }
26 | catch
27 | {
28 | // sometimes this will fail if we reference a weird library that can't be resolved, so we just swallow that exception and return false
29 | }
30 |
31 | return false;
32 | }
33 |
34 | /*
35 | // generates code like:
36 | this.InitSyncObject(m_sizes);
37 | */
38 | static void GenerateSyncObjectRegistration(ILProcessor worker, FieldDefinition fd)
39 | {
40 | worker.Append(worker.Create(OpCodes.Ldarg_0));
41 | worker.Append(worker.Create(OpCodes.Ldarg_0));
42 | worker.Append(worker.Create(OpCodes.Ldfld, fd));
43 |
44 | worker.Append(worker.Create(OpCodes.Call, WeaverTypes.InitSyncObjectReference));
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncObjectInitializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d02219b00b3674e59a2151f41e791688
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncObjectProcessor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Mono.CecilX;
3 |
4 | namespace Mirror.Weaver
5 | {
6 | public static class SyncObjectProcessor
7 | {
8 | ///
9 | /// Finds SyncObjects fields in a type
10 | /// Type should be a NetworkBehaviour
11 | ///
12 | ///
13 | ///
14 | public static List FindSyncObjectsFields(TypeDefinition td)
15 | {
16 | List syncObjects = new List();
17 |
18 | foreach (FieldDefinition fd in td.Fields)
19 | {
20 | if (fd.FieldType.Resolve().ImplementsInterface())
21 | {
22 | if (fd.IsStatic)
23 | {
24 | Weaver.Error($"{fd.Name} cannot be static", fd);
25 | continue;
26 | }
27 |
28 | GenerateReadersAndWriters(fd.FieldType);
29 |
30 | syncObjects.Add(fd);
31 | }
32 | }
33 |
34 |
35 | return syncObjects;
36 | }
37 |
38 | ///
39 | /// Generates serialization methods for synclists
40 | ///
41 | /// The synclist class
42 | /// the base SyncObject td inherits from
43 | static void GenerateReadersAndWriters(TypeReference tr)
44 | {
45 | if (tr is GenericInstanceType genericInstance)
46 | {
47 | foreach (TypeReference argument in genericInstance.GenericArguments)
48 | {
49 | if (!argument.IsGenericParameter)
50 | {
51 | Readers.GetReadFunc(argument);
52 | Writers.GetWriteFunc(argument);
53 | }
54 | }
55 | }
56 |
57 | if (tr != null)
58 | {
59 | GenerateReadersAndWriters(tr.Resolve().BaseType);
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncObjectProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 78f71efc83cde4917b7d21efa90bcc9a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f52c39bddd95d42b88f9cd554dfd9198
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb3ce6c6f3f2942ae88178b86f5a8282
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Program.cs:
--------------------------------------------------------------------------------
1 | // Removed 05/09/20
2 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Program.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0152994c9591626408fcfec96fcc7933
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Readers.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be40277098a024539bf63d0205cae824
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Resolvers.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3039a59c76aec43c797ad66930430367
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/TypeReferenceComparer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Mono.CecilX;
3 |
4 | namespace Mirror.Weaver
5 | {
6 | ///
7 | /// Compares TypeReference using FullName
8 | ///
9 | public class TypeReferenceComparer : IEqualityComparer
10 | {
11 | public bool Equals(TypeReference x, TypeReference y)
12 | {
13 | return x.FullName == y.FullName;
14 | }
15 |
16 | public int GetHashCode(TypeReference obj)
17 | {
18 | return obj.FullName.GetHashCode();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/TypeReferenceComparer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 55eb9eb8794946f4da7ad39788c9920b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Weaver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: de160f52931054064852f2afd7e7a86f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/WeaverExceptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Mono.CecilX;
3 |
4 | namespace Mirror.Weaver
5 | {
6 | [Serializable]
7 | public abstract class WeaverException : Exception
8 | {
9 | public MemberReference MemberReference { get; }
10 |
11 | protected WeaverException(string message, MemberReference member) : base(message)
12 | {
13 | MemberReference = member;
14 | }
15 |
16 | protected WeaverException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) : base(serializationInfo, streamingContext) { }
17 | }
18 |
19 | [Serializable]
20 | public class GenerateWriterException : WeaverException
21 | {
22 | public GenerateWriterException(string message, MemberReference member) : base(message, member) { }
23 | protected GenerateWriterException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) : base(serializationInfo, streamingContext) { }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/WeaverExceptions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8aaaf6193bad7424492677f8e81f1b30
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/WeaverTypes.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2585961bf7fe4c10a9143f4087efdf6f
3 | timeCreated: 1596486854
--------------------------------------------------------------------------------
/Assets/Mirror/Editor/Weaver/Writers.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a90060ad76ea044aba613080dd922709
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Icon.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b5f1356ad059a1243910a4e82cd68c5f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Icon/MirrorIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Mirror/Icon/MirrorIcon.png
--------------------------------------------------------------------------------
/Assets/Mirror/Notice.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1a7b49ad188074707b004e7bb8824857
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 05eb4061e2eb94061b9a08c918fff99b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ce126b4e1a7d13b4c865cd92929f13c3
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/License.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2008 - 2015 Jb Evain
2 | Copyright (c) 2008 - 2011 Novell, Inc.
3 |
4 | https://github.com/jbevain/cecil
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining
7 | a copy of this software and associated documentation files (the
8 | "Software"), to deal in the Software without restriction, including
9 | without limitation the rights to use, copy, modify, merge, publish,
10 | distribute, sublicense, and/or sell copies of the Software, and to
11 | permit persons to whom the Software is furnished to do so, subject to
12 | the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be
15 | included in all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 |
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/License.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab858db5ebbb0d542a9acd197669cb5a
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Mdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Mdb.dll
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Mdb.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a078fc7c0dc14d047a28dea9c93fd259
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | platformData:
13 | - first:
14 | '': Any
15 | second:
16 | enabled: 0
17 | settings:
18 | Exclude Editor: 0
19 | Exclude Linux: 1
20 | Exclude Linux64: 1
21 | Exclude LinuxUniversal: 1
22 | Exclude OSXUniversal: 1
23 | Exclude Win: 1
24 | Exclude Win64: 1
25 | - first:
26 | Any:
27 | second:
28 | enabled: 0
29 | settings: {}
30 | - first:
31 | Editor: Editor
32 | second:
33 | enabled: 1
34 | settings:
35 | DefaultValueInitialized: true
36 | - first:
37 | Facebook: Win
38 | second:
39 | enabled: 0
40 | settings:
41 | CPU: None
42 | - first:
43 | Facebook: Win64
44 | second:
45 | enabled: 0
46 | settings:
47 | CPU: None
48 | - first:
49 | Standalone: Linux
50 | second:
51 | enabled: 0
52 | settings:
53 | CPU: None
54 | - first:
55 | Standalone: Linux64
56 | second:
57 | enabled: 0
58 | settings:
59 | CPU: None
60 | - first:
61 | Standalone: LinuxUniversal
62 | second:
63 | enabled: 0
64 | settings:
65 | CPU: None
66 | - first:
67 | Standalone: OSXUniversal
68 | second:
69 | enabled: 0
70 | settings:
71 | CPU: x86
72 | - first:
73 | Standalone: Win
74 | second:
75 | enabled: 0
76 | settings:
77 | CPU: None
78 | - first:
79 | Standalone: Win64
80 | second:
81 | enabled: 0
82 | settings:
83 | CPU: None
84 | - first:
85 | Windows Store Apps: WindowsStoreApps
86 | second:
87 | enabled: 0
88 | settings:
89 | CPU: AnyCPU
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Pdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Pdb.dll
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Pdb.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 534d998d93b238041bddcd864f7f1088
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | platformData:
13 | - first:
14 | '': Any
15 | second:
16 | enabled: 0
17 | settings:
18 | Exclude Editor: 0
19 | Exclude Linux: 1
20 | Exclude Linux64: 1
21 | Exclude LinuxUniversal: 1
22 | Exclude OSXUniversal: 1
23 | Exclude Win: 1
24 | Exclude Win64: 1
25 | - first:
26 | Any:
27 | second:
28 | enabled: 0
29 | settings: {}
30 | - first:
31 | Editor: Editor
32 | second:
33 | enabled: 1
34 | settings:
35 | DefaultValueInitialized: true
36 | - first:
37 | Facebook: Win
38 | second:
39 | enabled: 0
40 | settings:
41 | CPU: None
42 | - first:
43 | Facebook: Win64
44 | second:
45 | enabled: 0
46 | settings:
47 | CPU: None
48 | - first:
49 | Standalone: Linux
50 | second:
51 | enabled: 0
52 | settings:
53 | CPU: None
54 | - first:
55 | Standalone: Linux64
56 | second:
57 | enabled: 0
58 | settings:
59 | CPU: None
60 | - first:
61 | Standalone: LinuxUniversal
62 | second:
63 | enabled: 0
64 | settings:
65 | CPU: None
66 | - first:
67 | Standalone: OSXUniversal
68 | second:
69 | enabled: 0
70 | settings:
71 | CPU: x86
72 | - first:
73 | Standalone: Win
74 | second:
75 | enabled: 0
76 | settings:
77 | CPU: None
78 | - first:
79 | Standalone: Win64
80 | second:
81 | enabled: 0
82 | settings:
83 | CPU: None
84 | - first:
85 | Windows Store Apps: WindowsStoreApps
86 | second:
87 | enabled: 0
88 | settings:
89 | CPU: AnyCPU
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Rocks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Rocks.dll
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.Rocks.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7526641fb3ae25144aa0a96aad853745
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | platformData:
13 | - first:
14 | '': Any
15 | second:
16 | enabled: 0
17 | settings:
18 | Exclude Editor: 0
19 | Exclude Linux: 1
20 | Exclude Linux64: 1
21 | Exclude LinuxUniversal: 1
22 | Exclude OSXUniversal: 1
23 | Exclude Win: 1
24 | Exclude Win64: 1
25 | - first:
26 | Any:
27 | second:
28 | enabled: 0
29 | settings: {}
30 | - first:
31 | Editor: Editor
32 | second:
33 | enabled: 1
34 | settings:
35 | DefaultValueInitialized: true
36 | - first:
37 | Facebook: Win
38 | second:
39 | enabled: 0
40 | settings:
41 | CPU: None
42 | - first:
43 | Facebook: Win64
44 | second:
45 | enabled: 0
46 | settings:
47 | CPU: None
48 | - first:
49 | Standalone: Linux
50 | second:
51 | enabled: 0
52 | settings:
53 | CPU: None
54 | - first:
55 | Standalone: Linux64
56 | second:
57 | enabled: 0
58 | settings:
59 | CPU: None
60 | - first:
61 | Standalone: LinuxUniversal
62 | second:
63 | enabled: 0
64 | settings:
65 | CPU: None
66 | - first:
67 | Standalone: OSXUniversal
68 | second:
69 | enabled: 0
70 | settings:
71 | CPU: x86
72 | - first:
73 | Standalone: Win
74 | second:
75 | enabled: 0
76 | settings:
77 | CPU: None
78 | - first:
79 | Standalone: Win64
80 | second:
81 | enabled: 0
82 | settings:
83 | CPU: None
84 | - first:
85 | Windows Store Apps: WindowsStoreApps
86 | second:
87 | enabled: 0
88 | settings:
89 | CPU: AnyCPU
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.dll
--------------------------------------------------------------------------------
/Assets/Mirror/Plugins/Mono.Cecil/Mono.CecilX.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 307911e5ad044dd42b1649eb8637aaf3
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | platformData:
13 | - first:
14 | '': Any
15 | second:
16 | enabled: 0
17 | settings:
18 | Exclude Editor: 0
19 | Exclude Linux: 1
20 | Exclude Linux64: 1
21 | Exclude LinuxUniversal: 1
22 | Exclude OSXUniversal: 1
23 | Exclude Win: 1
24 | Exclude Win64: 1
25 | - first:
26 | Any:
27 | second:
28 | enabled: 0
29 | settings: {}
30 | - first:
31 | Editor: Editor
32 | second:
33 | enabled: 1
34 | settings:
35 | CPU: AnyCPU
36 | DefaultValueInitialized: true
37 | OS: AnyOS
38 | - first:
39 | Facebook: Win
40 | second:
41 | enabled: 0
42 | settings:
43 | CPU: None
44 | - first:
45 | Facebook: Win64
46 | second:
47 | enabled: 0
48 | settings:
49 | CPU: None
50 | - first:
51 | Standalone: Linux
52 | second:
53 | enabled: 0
54 | settings:
55 | CPU: None
56 | - first:
57 | Standalone: Linux64
58 | second:
59 | enabled: 0
60 | settings:
61 | CPU: None
62 | - first:
63 | Standalone: LinuxUniversal
64 | second:
65 | enabled: 0
66 | settings:
67 | CPU: None
68 | - first:
69 | Standalone: OSXUniversal
70 | second:
71 | enabled: 0
72 | settings:
73 | CPU: x86
74 | - first:
75 | Standalone: Win
76 | second:
77 | enabled: 0
78 | settings:
79 | CPU: None
80 | - first:
81 | Standalone: Win64
82 | second:
83 | enabled: 0
84 | settings:
85 | CPU: None
86 | - first:
87 | Windows Store Apps: WindowsStoreApps
88 | second:
89 | enabled: 0
90 | settings:
91 | CPU: AnyCPU
92 | userData:
93 | assetBundleName:
94 | assetBundleVariant:
95 |
--------------------------------------------------------------------------------
/Assets/Mirror/Readme.txt:
--------------------------------------------------------------------------------
1 | Mirror is a MMO Scale Networking library for Unity, used in uMMORPG, uSurvival
2 | and several MMO projects in development.
3 |
4 | *** IMPORTANT -- You must restart Unity after importing Mirror for the Components Menu to update! ***
5 |
6 | Requirements:
7 | Unity 2018/2019 LTS
8 | Runtime .Net 4.x (Project Settings > Player > Other Settings)
9 |
10 | Documentation:
11 | https://mirror-networking.com/docs/
12 |
13 | Support:
14 | Discord: https://discordapp.com/invite/N9QVxbM
15 | Bug Reports: https://github.com/vis2k/Mirror/issues
16 |
--------------------------------------------------------------------------------
/Assets/Mirror/Readme.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f6d84e019c68446f28415a923b460a03
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9f4328ccc5f724e45afe2215d275b5d5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | [assembly: InternalsVisibleTo("Mirror.Tests.Common")]
4 | [assembly: InternalsVisibleTo("Mirror.Tests")]
5 | [assembly: InternalsVisibleTo("Mirror.Tests.Generated")]
6 | [assembly: InternalsVisibleTo("Mirror.Tests.Runtime")]
7 | [assembly: InternalsVisibleTo("Mirror.Tests.Performance.Editor")]
8 | [assembly: InternalsVisibleTo("Mirror.Tests.Performance.Runtime")]
9 | [assembly: InternalsVisibleTo("Mirror.Editor")]
10 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e28d5f410e25b42e6a76a2ffc10e4675
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/ClientScene.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 96fc7967f813e4960b9119d7c2118494
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Compression.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c28963f9c4b97e418252a55500fb91e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/CustomAttributes.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c04c722ee2ffd49c8a56ab33667b10b0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/DotNetCompatibility.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mirror
4 | {
5 | internal static class DotNetCompatibility
6 | {
7 | internal static string GetMethodName(this Delegate func)
8 | {
9 | #if NETFX_CORE
10 | return func.GetMethodInfo().Name;
11 | #else
12 | return func.Method.Name;
13 | #endif
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/DotNetCompatibility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b307f850ccbbe450295acf24d70e5c28
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/ExponentialMovingAverage.cs:
--------------------------------------------------------------------------------
1 | namespace Mirror
2 | {
3 | // implementation of N-day EMA
4 | // it calculates an exponential moving average roughly equivalent to the last n observations
5 | // https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
6 | public class ExponentialMovingAverage
7 | {
8 | readonly float alpha;
9 | bool initialized;
10 |
11 | public ExponentialMovingAverage(int n)
12 | {
13 | // standard N-day EMA alpha calculation
14 | alpha = 2.0f / (n + 1);
15 | }
16 |
17 | public void Add(double newValue)
18 | {
19 | // simple algorithm for EMA described here:
20 | // https://en.wikipedia.org/wiki/Moving_average#Exponentially_weighted_moving_variance_and_standard_deviation
21 | if (initialized)
22 | {
23 | double delta = newValue - Value;
24 | Value += alpha * delta;
25 | Var = (1 - alpha) * (Var + alpha * delta * delta);
26 | }
27 | else
28 | {
29 | Value = newValue;
30 | initialized = true;
31 | }
32 | }
33 |
34 | public double Value { get; private set; }
35 |
36 | public double Var { get; private set; }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/ExponentialMovingAverage.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 05e858cbaa54b4ce4a48c8c7f50c1914
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/FloatBytePacker.cs:
--------------------------------------------------------------------------------
1 | // File Removed 24-Mar-20 - keeping it in here so AssetStore updates overwrite
2 | // the old one.
3 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/FloatBytePacker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: afd3cca6a786d4208b1d0f7f2b168901
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/LocalConnections.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a88758df7db2043d6a9d926e0b6d4191
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/LogFactory.cs:
--------------------------------------------------------------------------------
1 | // File moved to Mirror/Runtime/Logging/LogFactory.cs
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/LogFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 353c7c9e14e82f349b1679112050b196
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/LogFilter.cs:
--------------------------------------------------------------------------------
1 | namespace Mirror
2 | {
3 | public static class LogFilter
4 | {
5 | public static bool Debug = false;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/LogFilter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f6928b080072948f7b2909b4025fcc79
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 63d647500ca1bfa4a845bc1f4cff9dcc
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/ConsoleColorLogHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Mirror.Logging
5 | {
6 | public class ConsoleColorLogHandler : ILogHandler
7 | {
8 | readonly bool showExceptionStackTrace;
9 |
10 | public ConsoleColorLogHandler(bool showExceptionStackTrace)
11 | {
12 | this.showExceptionStackTrace = showExceptionStackTrace;
13 | }
14 |
15 | public void LogException(Exception exception, UnityEngine.Object context)
16 | {
17 | Console.ForegroundColor = ConsoleColor.Red;
18 | Console.WriteLine($"Exception: {exception.Message}");
19 | if (showExceptionStackTrace)
20 | {
21 | Console.WriteLine($" {exception.StackTrace}");
22 | }
23 | Console.ResetColor();
24 | }
25 |
26 | public void LogFormat(LogType logType, UnityEngine.Object context, string format, params object[] args)
27 | {
28 | switch (logType)
29 | {
30 | case LogType.Exception:
31 | case LogType.Error:
32 | case LogType.Assert:
33 | Console.ForegroundColor = ConsoleColor.Red;
34 | break;
35 | case LogType.Warning:
36 | Console.ForegroundColor = ConsoleColor.Yellow;
37 | break;
38 | }
39 |
40 | Console.WriteLine(string.Format(format, args));
41 | Console.ResetColor();
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/ConsoleColorLogHandler.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a9618569c20a504aa86feb5913c70e9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/EditorLogSettingsLoader.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEngine;
3 |
4 | namespace Mirror.Logging
5 | {
6 | #if UNITY_EDITOR
7 | public static class EditorLogSettingsLoader
8 | {
9 | [InitializeOnLoadMethod]
10 | static void Init()
11 | {
12 | // load settings first time LogFactory is used in the editor
13 | LoadLogSettingsIntoDictionary();
14 | }
15 |
16 | public static void LoadLogSettingsIntoDictionary()
17 | {
18 | LogSettings settings = FindLogSettings();
19 | if (settings != null)
20 | {
21 | settings.LoadIntoDictionary(LogFactory.loggers);
22 | }
23 | }
24 |
25 | static LogSettings cache;
26 | public static LogSettings FindLogSettings()
27 | {
28 | if (cache != null)
29 | return cache;
30 |
31 | string[] assetGuids = AssetDatabase.FindAssets("t:" + nameof(LogSettings));
32 | if (assetGuids.Length == 0)
33 | return null;
34 |
35 | string firstGuid = assetGuids[0];
36 |
37 | string path = AssetDatabase.GUIDToAssetPath(firstGuid);
38 | cache = AssetDatabase.LoadAssetAtPath(path);
39 |
40 | if (assetGuids.Length > 2)
41 | {
42 | Debug.LogWarning("Found more than one LogSettings, Delete extra settings. Using first asset found: " + path);
43 | }
44 | Debug.Assert(cache != null, "Failed to load asset at: " + path);
45 |
46 | return cache;
47 | }
48 | }
49 | #endif
50 | }
51 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/EditorLogSettingsLoader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a39aa1e48aa54eb4e964f0191c1dcdce
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/LogFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d06522432d5a44e1587967a4731cd279
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/LogSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 633889a39717fde4fa28dd6b948dfac7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/NetworkHeadlessLogger.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Mirror.Logging
4 | {
5 | ///
6 | /// Used to replace log handler with Console Color LogHandler
7 | ///
8 | [DisallowMultipleComponent]
9 | [AddComponentMenu("Network/NetworkHeadlessLogger")]
10 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkHeadlessLogger.html")]
11 | public class NetworkHeadlessLogger : MonoBehaviour
12 | {
13 | #pragma warning disable CS0414 // unused private members
14 | [SerializeField] bool showExceptionStackTrace = false;
15 | #pragma warning restore CS0414 // unused private members
16 |
17 | void Awake()
18 | {
19 | #if UNITY_SERVER
20 | LogFactory.ReplaceLogHandler(new ConsoleColorLogHandler(showExceptionStackTrace));
21 | #endif
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/NetworkHeadlessLogger.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c7627623f2b9fad4484082517cd73e67
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/NetworkLogSettings.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Mirror.Logging
4 | {
5 | ///
6 | /// Used to load LogSettings in build
7 | ///
8 | [DisallowMultipleComponent]
9 | [AddComponentMenu("Network/NetworkLogSettings")]
10 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkLogSettings.html")]
11 | public class NetworkLogSettings : MonoBehaviour
12 | {
13 | [Header("Log Settings Asset")]
14 | [SerializeField] internal LogSettings settings;
15 |
16 | #if UNITY_EDITOR
17 | // called when component is added to GameObject
18 | void Reset()
19 | {
20 | LogSettings existingSettings = EditorLogSettingsLoader.FindLogSettings();
21 | if (existingSettings != null)
22 | {
23 | settings = existingSettings;
24 |
25 | UnityEditor.EditorUtility.SetDirty(this);
26 | }
27 | }
28 | #endif
29 |
30 | void Awake()
31 | {
32 | RefreshDictionary();
33 | }
34 |
35 | void OnValidate()
36 | {
37 | // if settings field is changed
38 | RefreshDictionary();
39 | }
40 |
41 | void RefreshDictionary()
42 | {
43 | settings.LoadIntoDictionary(LogFactory.loggers);
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Logging/NetworkLogSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ac6e8eccf4b6f4dc7b24c276ef47fde8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/MessagePacker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2db134099f0df4d96a84ae7a0cd9b4bc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Messages.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 938f6f28a6c5b48a0bbd7782342d763b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Mirror.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Mirror",
3 | "references": [
4 | "Mirror.CompilerSymbols",
5 | "Telepathy",
6 | "kcp2k"
7 | ],
8 | "optionalUnityReferences": [],
9 | "includePlatforms": [],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": true,
15 | "defineConstraints": []
16 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Mirror.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 30817c1a0e6d646d99c048fc403f5979
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkAuthenticator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 407fc95d4a8257f448799f26cdde0c2a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 655ee8cba98594f70880da5cc4dc442d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: abe6be14204d94224a3e7cd99dd2ea73
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkConnection.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 11ea41db366624109af1f0834bcdde2f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkConnectionToClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bb2195f8b29d24f0680a57fde2e9fd09
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkConnectionToServer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Mirror
5 | {
6 | public class NetworkConnectionToServer : NetworkConnection
7 | {
8 | static readonly ILogger logger = LogFactory.GetLogger();
9 |
10 | public override string address => "";
11 |
12 | internal override void Send(ArraySegment segment, int channelId = Channels.DefaultReliable)
13 | {
14 | if (logger.LogEnabled()) logger.Log("ConnectionSend " + this + " bytes:" + BitConverter.ToString(segment.Array, segment.Offset, segment.Count));
15 |
16 | // validate packet size first.
17 | if (ValidatePacketSize(segment, channelId))
18 | {
19 | Transport.activeTransport.ClientSend(channelId, segment);
20 | }
21 | }
22 |
23 | ///
24 | /// Disconnects this connection.
25 | ///
26 | public override void Disconnect()
27 | {
28 | // set not ready and handle clientscene disconnect in any case
29 | // (might be client or host mode here)
30 | isReady = false;
31 | ClientScene.HandleClientDisconnect(this);
32 | Transport.activeTransport.ClientDisconnect();
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkConnectionToServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 761977cbf38a34ded9dd89de45445675
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkDiagnostics.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c3754b39e5f8740fd93f3337b2c4274e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkIdentity.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9b91ecbcc199f4492b9a91e820070131
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8aab4c8111b7c411b9b92cf3dbc5bd4e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkManagerHUD.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6442dc8070ceb41f094e44de0bf87274
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkMessage.cs:
--------------------------------------------------------------------------------
1 | // file removed 03/17/2020
2 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkMessage.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eb04e4848a2e4452aa2dbd7adb801c51
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1610f05ec5bd14d6882e689f7372596a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkReaderPool.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2bacff63613ad634a98f9e4d15d29dbf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a5f5ec068f5604c32b160bc49ee97b75
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkStartPosition.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Mirror
4 | {
5 | ///
6 | /// This component is used to make a gameObject a starting position for spawning player objects in multiplayer games.
7 | /// This object's transform will be automatically registered and unregistered with the NetworkManager as a starting position.
8 | ///
9 | [DisallowMultipleComponent]
10 | [AddComponentMenu("Network/NetworkStartPosition")]
11 | [HelpURL("https://mirror-networking.com/docs/Articles/Components/NetworkStartPosition.html")]
12 | public class NetworkStartPosition : MonoBehaviour
13 | {
14 | public void Awake()
15 | {
16 | NetworkManager.RegisterStartPosition(transform);
17 | }
18 |
19 | public void OnDestroy()
20 | {
21 | NetworkManager.UnRegisterStartPosition(transform);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkStartPosition.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 41f84591ce72545258ea98cb7518d8b9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkTime.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 09a0c241fc4a5496dbf4a0ab6e9a312c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkVisibility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c08f1a030234d49d391d7223a8592f15
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48d2207bcef1f4477b624725f075f9bd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkWriterPool.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mirror
4 | {
5 | ///
6 | /// NetworkWriter to be used with NetworkWriterPool
7 | ///
8 | public sealed class PooledNetworkWriter : NetworkWriter, IDisposable
9 | {
10 | public void Dispose()
11 | {
12 | NetworkWriterPool.Recycle(this);
13 | }
14 | }
15 |
16 | ///
17 | /// Pool of NetworkWriters
18 | /// Use this pool instead of NetworkWriter to reduce memory allocation
19 | ///
20 | public static class NetworkWriterPool
21 | {
22 | // reuse Pool
23 | // we still wrap it in NetworkWriterPool.Get/Recycle so we can reset the
24 | // position before reusing.
25 | // this is also more consistent with NetworkReaderPool where we need to
26 | // assign the internal buffer before reusing.
27 | static readonly Pool pool = new Pool(
28 | () => new PooledNetworkWriter()
29 | );
30 |
31 | ///
32 | /// Get the next writer in the pool
33 | /// If pool is empty, creates a new Writer
34 | ///
35 | public static PooledNetworkWriter GetWriter()
36 | {
37 | // grab from pool & reset position
38 | PooledNetworkWriter writer = pool.Take();
39 | writer.Reset();
40 | return writer;
41 | }
42 |
43 | ///
44 | /// Puts writer back into pool
45 | /// When pool is full, the extra writer is left for the GC
46 | ///
47 | public static void Recycle(PooledNetworkWriter writer)
48 | {
49 | pool.Return(writer);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/NetworkWriterPool.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3f34b53bea38e4f259eb8dc211e4fdb6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Pool.cs:
--------------------------------------------------------------------------------
1 | // Pool to avoid allocations (from libuv2k)
2 | using System;
3 | using System.Collections.Generic;
4 |
5 | namespace Mirror
6 | {
7 | public class Pool
8 | {
9 | // Mirror is single threaded, no need for concurrent collections
10 | readonly Stack objects = new Stack();
11 |
12 | // some types might need additional parameters in their constructor, so
13 | // we use a Func generator
14 | readonly Func objectGenerator;
15 |
16 | public Pool(Func objectGenerator)
17 | {
18 | this.objectGenerator = objectGenerator;
19 | }
20 |
21 | // take an element from the pool, or create a new one if empty
22 | public T Take() => objects.Count > 0 ? objects.Pop() : objectGenerator();
23 |
24 | // return an element to the pool
25 | public void Return(T item) => objects.Push(item);
26 |
27 | // count to see how many objects are in the pool. useful for tests.
28 | public int Count => objects.Count;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Pool.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 845bb05fa349344c3811022f4f15dfbc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/RemoteCallHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d2cdbcbd1e377d6408a91acbec31ba16
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/StringHash.cs:
--------------------------------------------------------------------------------
1 | namespace Mirror
2 | {
3 | public static class StringHash
4 | {
5 | // string.GetHashCode is not guaranteed to be the same on all machines, but
6 | // we need one that is the same on all machines. simple and stupid:
7 | public static int GetStableHashCode(this string text)
8 | {
9 | unchecked
10 | {
11 | int hash = 23;
12 | foreach (char c in text)
13 | hash = hash * 31 + c;
14 | return hash;
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/StringHash.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 733f020f9b76d453da841089579fd7a7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/SyncDictionary.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4b346c49cfdb668488a364c3023590e2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/SyncList.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 744fc71f748fe40d5940e04bf42b29f3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/SyncObject.cs:
--------------------------------------------------------------------------------
1 | namespace Mirror
2 | {
3 | ///
4 | /// A sync object is an object that can synchronize it's state
5 | /// between server and client, such as a SyncList
6 | ///
7 | public interface SyncObject
8 | {
9 | ///
10 | /// true if there are changes since the last flush
11 | ///
12 | bool IsDirty { get; }
13 |
14 | ///
15 | /// Discard all the queued changes
16 | /// Consider the object fully synchronized with clients
17 | ///
18 | void Flush();
19 |
20 | ///
21 | /// Write a full copy of the object
22 | ///
23 | ///
24 | void OnSerializeAll(NetworkWriter writer);
25 |
26 | ///
27 | /// Write the changes made to the object since last sync
28 | ///
29 | ///
30 | void OnSerializeDelta(NetworkWriter writer);
31 |
32 | ///
33 | /// Reads a full copy of the object
34 | ///
35 | ///
36 | void OnDeserializeAll(NetworkReader reader);
37 |
38 | ///
39 | /// Reads the changes made to the object since last sync
40 | ///
41 | ///
42 | void OnDeserializeDelta(NetworkReader reader);
43 |
44 | ///
45 | /// Resets the SyncObject so that it can be re-used
46 | ///
47 | void Reset();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/SyncObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae226d17a0c844041aa24cc2c023dd49
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/SyncSet.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8a31599d9f9dd4ef9999f7b9707c832c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7825d46cd73fe47938869eb5427b40fa
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/FallbackTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 330c9aab13d2d42069c6ebbe582b73ca
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 953bb5ec5ab2346a092f58061e01ba65
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/MirrorTransport.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7bdb797750d0a490684410110bf48192
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/MirrorTransport/KcpTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6b0fecffa3f624585964b0d0eb21b18e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 71a1c8e8c022d4731a481c1808f37e5d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 limpo1989
4 | Copyright (c) 2020 Paul Pacheco
5 | Copyright (c) 2020 Lymdun
6 | Copyright (c) 2020 vis2k
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all
16 | copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | SOFTWARE.
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/LICENSE.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9a3e8369060cf4e94ac117603de47aa6
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/VERSION.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed3f2cf1bbf1b4d53a6f2c103d311f71
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a54d18b954cb4407a28b633fc32ea6d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpChannel.cs:
--------------------------------------------------------------------------------
1 | namespace kcp2k
2 | {
3 | // channel type and header for raw messages
4 | public enum KcpChannel : byte
5 | {
6 | // don't react on 0x00. might help to filter out random noise.
7 | Reliable = 0x01,
8 | Unreliable = 0x02
9 | }
10 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpChannel.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9e852b2532fb248d19715cfebe371db3
3 | timeCreated: 1610081248
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6aa069a28ed24fedb533c102d9742b36
3 | timeCreated: 1603786960
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpClientConnection.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 96512e74aa8214a6faa8a412a7a07877
3 | timeCreated: 1602601237
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpConnection.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3915c7c62b72d4dc2a9e4e76c94fc484
3 | timeCreated: 1602600432
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpHeader.cs:
--------------------------------------------------------------------------------
1 | namespace kcp2k
2 | {
3 | // header for messages processed by kcp.
4 | // this is NOT for the raw receive messages(!) because handshake/disconnect
5 | // need to be sent reliably. it's not enough to have those in rawreceive
6 | // because those messages might get lost without being resent!
7 | public enum KcpHeader : byte
8 | {
9 | // don't react on 0x00. might help to filter out random noise.
10 | Handshake = 0x01,
11 | // ping goes over reliable & KcpHeader for now. could go over reliable
12 | // too. there is no real difference except that this is easier because
13 | // we already have a KcpHeader for reliable messages.
14 | // ping is only used to keep it alive, so latency doesn't matter.
15 | Ping = 0x02,
16 | Data = 0x03,
17 | Disconnect = 0x04
18 | }
19 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpHeader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 91b5edac31224a49bd76f960ae018942
3 | timeCreated: 1610081248
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9759159c6589494a9037f5e130a867ed
3 | timeCreated: 1603787747
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpServerConnection.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using System.Net.Sockets;
3 |
4 | namespace kcp2k
5 | {
6 | public class KcpServerConnection : KcpConnection
7 | {
8 | public KcpServerConnection(Socket socket, EndPoint remoteEndpoint, bool noDelay, uint interval = Kcp.INTERVAL, int fastResend = 0, bool congestionWindow = true, uint sendWindowSize = Kcp.WND_SND, uint receiveWindowSize = Kcp.WND_RCV)
9 | {
10 | this.socket = socket;
11 | this.remoteEndpoint = remoteEndpoint;
12 | SetupKcp(noDelay, interval, fastResend, congestionWindow, sendWindowSize, receiveWindowSize);
13 | }
14 |
15 | protected override void RawSend(byte[] data, int length)
16 | {
17 | socket.SendTo(data, 0, length, SocketFlags.None, remoteEndpoint);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpServerConnection.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 80a9b1ce9a6f14abeb32bfa9921d097b
3 | timeCreated: 1602601483
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/Log.cs:
--------------------------------------------------------------------------------
1 | // A simple logger class that uses Console.WriteLine by default.
2 | // Can also do Logger.LogMethod = Debug.Log for Unity etc.
3 | // (this way we don't have to depend on UnityEngine)
4 | using System;
5 |
6 | namespace kcp2k
7 | {
8 | public static class Log
9 | {
10 | public static Action Info = Console.WriteLine;
11 | public static Action Warning = Console.WriteLine;
12 | public static Action Error = Console.Error.WriteLine;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/Log.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7b5e1de98d6d84c3793a61cf7d8da9a4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/kcp.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5cafb8851a0084f3e94a580c207b3923
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/kcp/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | [assembly: InternalsVisibleTo("kcp2k.Tests")]
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/kcp/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aec6a15ac7bd43129317ea1f01f19782
3 | timeCreated: 1602665988
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/kcp/Kcp.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a59b1cae10a334faf807432ab472f212
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/kcp/Segment.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fc58706a05dd3442c8fde858d5266855
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/kcp/Utils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ef959eb716205bd48b050f010a9a35ae
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/kcp2k.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "kcp2k",
3 | "references": [],
4 | "optionalUnityReferences": [],
5 | "includePlatforms": [],
6 | "excludePlatforms": [],
7 | "allowUnsafeCode": true,
8 | "overrideReferences": false,
9 | "precompiledReferences": [],
10 | "autoReferenced": true,
11 | "defineConstraints": []
12 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/KCP/kcp2k/kcp2k.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6806a62c384838046a3c66c44f06d75f
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/MiddlewareTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 46f20ede74658e147a1af57172710de2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/MultiplexTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 929e3234c7db540b899f00183fc2b1fe
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a3ba68af305d809418d6c6a804939290
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | [assembly: InternalsVisibleTo("SimpleWebTransport.Tests.Runtime")]
4 | [assembly: InternalsVisibleTo("SimpleWebTransport.Tests.Editor")]
5 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ee9e76201f7665244bd6ab8ea343a83f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5faa957b8d9fc314ab7596ccf14750d9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/SimpleWebClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 13131761a0bf5a64dadeccd700fe26e5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/StandAlone.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a9c19d05220a87c4cbbe4d1e422da0aa
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/StandAlone/ClientHandshake.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ffdcabc9e28f764a94fc4efc82d3e8b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/StandAlone/ClientSslHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Net.Security;
4 | using System.Net.Sockets;
5 | using System.Security.Cryptography.X509Certificates;
6 |
7 | namespace Mirror.SimpleWeb
8 | {
9 | internal class ClientSslHelper
10 | {
11 | internal bool TryCreateStream(Connection conn, Uri uri)
12 | {
13 | NetworkStream stream = conn.client.GetStream();
14 | if (uri.Scheme != "wss")
15 | {
16 | conn.stream = stream;
17 | return true;
18 | }
19 |
20 | try
21 | {
22 | conn.stream = CreateStream(stream, uri);
23 | return true;
24 | }
25 | catch (Exception e)
26 | {
27 | Log.Error($"Create SSLStream Failed: {e}", false);
28 | return false;
29 | }
30 | }
31 |
32 | Stream CreateStream(NetworkStream stream, Uri uri)
33 | {
34 | SslStream sslStream = new SslStream(stream, true, ValidateServerCertificate);
35 | sslStream.AuthenticateAsClient(uri.Host);
36 | return sslStream;
37 | }
38 |
39 | static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
40 | {
41 | // Do not allow this client to communicate with unauthenticated servers.
42 |
43 | // only accept if no errors
44 | return sslPolicyErrors == SslPolicyErrors.None;
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/StandAlone/ClientSslHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 46055a75559a79849a750f39a766db61
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/StandAlone/WebSocketClientStandAlone.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 05a9c87dea309e241a9185e5aa0d72ab
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/Webgl.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7142349d566213c4abc763afaf4d91a1
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/Webgl/SimpleWebJSLib.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | #if UNITY_WEBGL
3 | using System.Runtime.InteropServices;
4 | #endif
5 |
6 | namespace Mirror.SimpleWeb
7 | {
8 | internal static class SimpleWebJSLib
9 | {
10 | #if UNITY_WEBGL
11 | [DllImport("__Internal")]
12 | internal static extern bool IsConnected(int index);
13 |
14 | #pragma warning disable CA2101 // Specify marshaling for P/Invoke string arguments
15 | [DllImport("__Internal")]
16 | #pragma warning restore CA2101 // Specify marshaling for P/Invoke string arguments
17 | internal static extern int Connect(string address, Action openCallback, Action closeCallBack, Action messageCallback, Action errorCallback);
18 |
19 | [DllImport("__Internal")]
20 | internal static extern void Disconnect(int index);
21 |
22 | [DllImport("__Internal")]
23 | internal static extern bool Send(int index, byte[] array, int offset, int length);
24 | #else
25 | internal static bool IsConnected(int index) => throw new NotSupportedException();
26 |
27 | internal static int Connect(string address, Action openCallback, Action closeCallBack, Action messageCallback, Action errorCallback) => throw new NotSupportedException();
28 |
29 | internal static void Disconnect(int index) => throw new NotSupportedException();
30 |
31 | internal static bool Send(int index, byte[] array, int offset, int length) => throw new NotSupportedException();
32 | #endif
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/Webgl/SimpleWebJSLib.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 97b96a0b65c104443977473323c2ff35
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/Webgl/WebSocketClientWebGl.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 015c5b1915fd1a64cbe36444d16b2f7d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/Webgl/plugin.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1999985791b91b9458059e88404885a7
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Client/Webgl/plugin/SimpleWeb.jslib.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 54452a8c6d2ca9b49a8c79f81b50305c
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 0
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Facebook: WebGL
27 | second:
28 | enabled: 1
29 | settings: {}
30 | - first:
31 | WebGL: WebGL
32 | second:
33 | enabled: 1
34 | settings: {}
35 | userData:
36 | assetBundleName:
37 | assetBundleVariant:
38 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 564d2cd3eee5b21419553c0528739d1b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/BufferPool.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94ae50f3ec35667469b861b12cd72f92
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/Connection.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a13073c2b49d39943888df45174851bd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/Constants.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 85d110a089d6ad348abf2d073ebce7cd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/EventType.cs:
--------------------------------------------------------------------------------
1 | namespace Mirror.SimpleWeb
2 | {
3 | public enum EventType
4 | {
5 | Connected,
6 | Data,
7 | Disconnected,
8 | Error
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/EventType.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2d9cd7d2b5229ab42a12e82ae17d0347
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/Log.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3cf1521098e04f74fbea0fe2aa0439f8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/Message.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mirror.SimpleWeb
4 | {
5 | public struct Message
6 | {
7 | public readonly int connId;
8 | public readonly EventType type;
9 | public readonly ArrayBuffer data;
10 | public readonly Exception exception;
11 |
12 | public Message(EventType type) : this()
13 | {
14 | this.type = type;
15 | }
16 |
17 | public Message(ArrayBuffer data) : this()
18 | {
19 | type = EventType.Data;
20 | this.data = data;
21 | }
22 |
23 | public Message(Exception exception) : this()
24 | {
25 | type = EventType.Error;
26 | this.exception = exception;
27 | }
28 |
29 | public Message(int connId, EventType type) : this()
30 | {
31 | this.connId = connId;
32 | this.type = type;
33 | }
34 |
35 | public Message(int connId, ArrayBuffer data) : this()
36 | {
37 | this.connId = connId;
38 | type = EventType.Data;
39 | this.data = data;
40 | }
41 |
42 | public Message(int connId, Exception exception) : this()
43 | {
44 | this.connId = connId;
45 | type = EventType.Error;
46 | this.exception = exception;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/Message.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f5d05d71b09d2714b96ffe80bc3d2a77
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/MessageProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4c1f218a2b16ca846aaf23260078e549
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/ReadHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9f4fa5d324e708c46a55810a97de75bc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/ReceiveLoop.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a26c2815f58431c4a98c158c8b655ffd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/SendLoop.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f87dd81736d9c824db67f808ac71841d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/TcpConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Net.Sockets;
2 |
3 | namespace Mirror.SimpleWeb
4 | {
5 | public struct TcpConfig
6 | {
7 | public readonly bool noDelay;
8 | public readonly int sendTimeout;
9 | public readonly int receiveTimeout;
10 |
11 | public TcpConfig(bool noDelay, int sendTimeout, int receiveTimeout)
12 | {
13 | this.noDelay = noDelay;
14 | this.sendTimeout = sendTimeout;
15 | this.receiveTimeout = receiveTimeout;
16 | }
17 |
18 | public void ApplyTo(TcpClient client)
19 | {
20 | client.SendTimeout = sendTimeout;
21 | client.ReceiveTimeout = receiveTimeout;
22 | client.NoDelay = noDelay;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/TcpConfig.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 81ac8d35f28fab14b9edda5cd9d4fc86
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/Utils.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 |
3 | namespace Mirror.SimpleWeb
4 | {
5 | internal static class Utils
6 | {
7 | public static void CheckForInterupt()
8 | {
9 | // sleep in order to check for ThreadInterruptedException
10 | Thread.Sleep(1);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Common/Utils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4643ffb4cb0562847b1ae925d07e15b6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/README.txt:
--------------------------------------------------------------------------------
1 | SimpleWebTransport is a Transport that implements websocket for Webgl builds of
2 | mirror. This transport can also work on standalone builds and has support for
3 | encryption with websocket secure.
4 |
5 | How to use:
6 | Replace your existing Transport with SimpleWebTransport on your NetworkManager
7 |
8 | Requirements:
9 | Unity 2018.4 LTS
10 | Mirror v18.0.0
11 |
12 | Documentation:
13 | https://mirror-networking.com/docs/
14 | https://github.com/MirrorNetworking/SimpleWebTransport/blob/master/README.md
15 |
16 | Support:
17 | Discord: https://discordapp.com/invite/N9QVxbM
18 | Bug Reports: https://github.com/MirrorNetworking/SimpleWebTransport/issues
19 |
20 |
21 | **To get most recent updates and fixes download from github**
22 | https://github.com/MirrorNetworking/SimpleWebTransport/releases
23 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/README.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0e3971d5783109f4d9ce93c7a689d701
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Server.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0e599e92544d43344a9a9060052add28
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Server/ServerHandshake.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6268509ac4fb48141b9944c03295da11
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Server/ServerSslHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 11061fee528ebdd43817a275b1e4a317
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Server/SimpleWebServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bd51d7896f55a5e48b41a4b526562b0e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/Server/WebSocketServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c434db044777d2439bae5a57d4e8ee7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/SimpleWebTransport.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SimpleWebTransport",
3 | "references": [
4 | "Mirror"
5 | ],
6 | "optionalUnityReferences": [],
7 | "includePlatforms": [],
8 | "excludePlatforms": [],
9 | "allowUnsafeCode": false,
10 | "overrideReferences": false,
11 | "precompiledReferences": [],
12 | "autoReferenced": true,
13 | "defineConstraints": []
14 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/SimpleWebTransport.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3b5390adca4e2bb4791cb930316d6f3e
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/SimpleWebTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0110f245bfcfc7d459681f7bd9ebc590
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/SslConfigLoader.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using UnityEngine;
3 |
4 | namespace Mirror.SimpleWeb
5 | {
6 | internal class SslConfigLoader
7 | {
8 | internal struct Cert
9 | {
10 | public string path;
11 | public string password;
12 | }
13 | internal static SslConfig Load(SimpleWebTransport transport)
14 | {
15 | // don't need to load anything if ssl is not enabled
16 | if (!transport.sslEnabled)
17 | return default;
18 |
19 | string certJsonPath = transport.sslCertJson;
20 |
21 | Cert cert = LoadCertJson(certJsonPath);
22 |
23 | return new SslConfig(
24 | enabled: transport.sslEnabled,
25 | sslProtocols: transport.sslProtocols,
26 | certPath: cert.path,
27 | certPassword: cert.password
28 | );
29 | }
30 |
31 | internal static Cert LoadCertJson(string certJsonPath)
32 | {
33 | string json = File.ReadAllText(certJsonPath);
34 | Cert cert = JsonUtility.FromJson(json);
35 |
36 | if (string.IsNullOrEmpty(cert.path))
37 | {
38 | throw new InvalidDataException("Cert Json didn't not contain \"path\"");
39 | }
40 | if (string.IsNullOrEmpty(cert.password))
41 | {
42 | // password can be empty
43 | cert.password = string.Empty;
44 | }
45 |
46 | return cert;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/SimpleWebTransport/SslConfigLoader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dfdb6b97a48a48b498e563e857342da1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 552b3d8382916438d81fe7f39e18db72
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Client.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a5b95294cc4ec4b15aacba57531c7985
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Common.cs:
--------------------------------------------------------------------------------
1 | // common code used by server and client
2 | namespace Telepathy
3 | {
4 | public abstract class Common
5 | {
6 | // IMPORTANT: DO NOT SHARE STATE ACROSS SEND/RECV LOOPS (DATA RACES)
7 | // (except receive pipe which is used for all threads)
8 |
9 | // NoDelay disables nagle algorithm. lowers CPU% and latency but
10 | // increases bandwidth
11 | public bool NoDelay = true;
12 |
13 | // Prevent allocation attacks. Each packet is prefixed with a length
14 | // header, so an attacker could send a fake packet with length=2GB,
15 | // causing the server to allocate 2GB and run out of memory quickly.
16 | // -> simply increase max packet size if you want to send around bigger
17 | // files!
18 | // -> 16KB per message should be more than enough.
19 | public readonly int MaxMessageSize;
20 |
21 | // Send would stall forever if the network is cut off during a send, so
22 | // we need a timeout (in milliseconds)
23 | public int SendTimeout = 5000;
24 |
25 | // Default TCP receive time out can be huge (minutes).
26 | // That's way too much for games, let's make it configurable.
27 | // we need a timeout (in milliseconds)
28 | public int ReceiveTimeout = 5000;
29 |
30 | // constructor
31 | protected Common(int MaxMessageSize)
32 | {
33 | this.MaxMessageSize = MaxMessageSize;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Common.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c4d56322cf0e248a89103c002a505dab
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/ConnectionState.cs:
--------------------------------------------------------------------------------
1 | // both server and client need a connection state object.
2 | // -> server needs it to keep track of multiple connections
3 | // -> client needs it to safely create a new connection state on every new
4 | // connect in order to avoid data races where a dieing thread might still
5 | // modify the current state. can't happen if we create a new state each time!
6 | // (fixes all the flaky tests)
7 | //
8 | // ... besides, it also allows us to share code!
9 | using System.Net.Sockets;
10 | using System.Threading;
11 |
12 | namespace Telepathy
13 | {
14 | public class ConnectionState
15 | {
16 | public TcpClient client;
17 |
18 | // thread safe pipe to send messages from main thread to send thread
19 | public readonly MagnificentSendPipe sendPipe;
20 |
21 | // ManualResetEvent to wake up the send thread. better than Thread.Sleep
22 | // -> call Set() if everything was sent
23 | // -> call Reset() if there is something to send again
24 | // -> call WaitOne() to block until Reset was called
25 | public ManualResetEvent sendPending = new ManualResetEvent(false);
26 |
27 | public ConnectionState(TcpClient client, int MaxMessageSize)
28 | {
29 | this.client = client;
30 |
31 | // create send pipe with max message size for pooling
32 | sendPipe = new MagnificentSendPipe(MaxMessageSize);
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/ConnectionState.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: af95e2b6f6343411aa8bdf871abd7b1b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/EventType.cs:
--------------------------------------------------------------------------------
1 | namespace Telepathy
2 | {
3 | public enum EventType
4 | {
5 | Connected,
6 | Data,
7 | Disconnected
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/EventType.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 49f1a330755814803be5f27f493e1910
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018, vis2k
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/LICENSE.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0ba11103b95fd4721bffbb08440d5b8e
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Log.cs:
--------------------------------------------------------------------------------
1 | // A simple logger class that uses Console.WriteLine by default.
2 | // Can also do Logger.LogMethod = Debug.Log for Unity etc.
3 | // (this way we don't have to depend on UnityEngine.DLL and don't need a
4 | // different version for every UnityEngine version here)
5 | using System;
6 |
7 | namespace Telepathy
8 | {
9 | public static class Log
10 | {
11 | public static Action Info = Console.WriteLine;
12 | public static Action Warning = Console.WriteLine;
13 | public static Action Error = Console.Error.WriteLine;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Log.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0a123d054bef34d059057ac2ce936605
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Logger.cs:
--------------------------------------------------------------------------------
1 | // removed 2021-02-04
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Logger.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aa8d703f0b73f4d6398b76812719b68b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/MagnificentReceivePipe.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 010a208972a9a4e0cb0e7c18a60b4494
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/MagnificentSendPipe.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d490021c2e6a64374bc88168cec75c70
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Message.cs:
--------------------------------------------------------------------------------
1 | // removed 2021-02-04
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Message.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aedf812e9637b4f92a35db1aedca8c92
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/NetworkStreamExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a8076c43fa8d4d45831adae232d4d3c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Pool.cs:
--------------------------------------------------------------------------------
1 | // pool to avoid allocations. originally from libuv2k.
2 | using System;
3 | using System.Collections.Generic;
4 |
5 | namespace Telepathy
6 | {
7 | public class Pool
8 | {
9 | // objects
10 | readonly Stack objects = new Stack();
11 |
12 | // some types might need additional parameters in their constructor, so
13 | // we use a Func generator
14 | readonly Func objectGenerator;
15 |
16 | // constructor
17 | public Pool(Func objectGenerator)
18 | {
19 | this.objectGenerator = objectGenerator;
20 | }
21 |
22 | // take an element from the pool, or create a new one if empty
23 | public T Take() => objects.Count > 0 ? objects.Pop() : objectGenerator();
24 |
25 | // return an element to the pool
26 | public void Return(T item) => objects.Push(item);
27 |
28 | // clear the pool with the disposer function applied to each object
29 | public void Clear() => objects.Clear();
30 |
31 | // count to see how many objects are in the pool. useful for tests.
32 | public int Count() => objects.Count;
33 | }
34 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Pool.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6d3e530f6872642ec81e9b8b76277c93
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/SafeQueue.cs:
--------------------------------------------------------------------------------
1 | // removed 2021-02-04
2 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/SafeQueue.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8fc06e2fb29854a0c9e90c0188d36a08
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Server.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb98a16841ccc4338a7e0b4e59136563
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Telepathy.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Telepathy",
3 | "references": [],
4 | "optionalUnityReferences": [],
5 | "includePlatforms": [],
6 | "excludePlatforms": [],
7 | "allowUnsafeCode": false,
8 | "overrideReferences": false,
9 | "precompiledReferences": [],
10 | "autoReferenced": true,
11 | "defineConstraints": []
12 | }
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Telepathy.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 725ee7191c021de4dbf9269590ded755
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/ThreadExtensions.cs:
--------------------------------------------------------------------------------
1 | // removed 2021-02-04
2 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/ThreadExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64df4eaebe4ff9a43a9fb318c3e8e321
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/ThreadFunctions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d01598bf851164dc48a24c26913460b9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Utils.cs:
--------------------------------------------------------------------------------
1 | namespace Telepathy
2 | {
3 | public static class Utils
4 | {
5 | // IntToBytes version that doesn't allocate a new byte[4] each time.
6 | // -> important for MMO scale networking performance.
7 | public static void IntToBytesBigEndianNonAlloc(int value, byte[] bytes, int offset = 0)
8 | {
9 | bytes[offset + 0] = (byte)(value >> 24);
10 | bytes[offset + 1] = (byte)(value >> 16);
11 | bytes[offset + 2] = (byte)(value >> 8);
12 | bytes[offset + 3] = (byte)value;
13 | }
14 |
15 | public static int BytesToIntBigEndian(byte[] bytes)
16 | {
17 | return (bytes[0] << 24) |
18 | (bytes[1] << 16) |
19 | (bytes[2] << 8) |
20 | bytes[3];
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/Utils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 951d08c05297f4b3e8feb5bfcab86531
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Telepathy/VERSION.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d942af06608be434dbeeaa58207d20bd
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/TelepathyTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c7424c1070fad4ba2a7a96b02fbeb4bb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 1000
8 | icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/Transport/Transport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cfffcac25d6d64ced9de620159e221b8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/UNetwork.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using UnityEngine;
4 |
5 | namespace Mirror
6 | {
7 | // Handles network messages on client and server
8 | public delegate void NetworkMessageDelegate(NetworkConnection conn, NetworkReader reader, int channelId);
9 |
10 | // Handles requests to spawn objects on the client
11 | public delegate GameObject SpawnDelegate(Vector3 position, Guid assetId);
12 |
13 | public delegate GameObject SpawnHandlerDelegate(SpawnMessage msg);
14 |
15 | // Handles requests to unspawn objects on the client
16 | public delegate void UnSpawnDelegate(GameObject spawned);
17 |
18 | // invoke type for Cmd/Rpc
19 | public enum MirrorInvokeType
20 | {
21 | Command,
22 | ClientRpc
23 | }
24 |
25 | public enum Version
26 | {
27 | Current = 1
28 | }
29 |
30 | public static class Channels
31 | {
32 | public const int DefaultReliable = 0;
33 | public const int DefaultUnreliable = 1;
34 | }
35 |
36 | // -- helpers for float conversion without allocations --
37 | [StructLayout(LayoutKind.Explicit)]
38 | internal struct UIntFloat
39 | {
40 | [FieldOffset(0)]
41 | public float floatValue;
42 |
43 | [FieldOffset(0)]
44 | public uint intValue;
45 | }
46 |
47 | [StructLayout(LayoutKind.Explicit)]
48 | internal struct UIntDouble
49 | {
50 | [FieldOffset(0)]
51 | public double doubleValue;
52 |
53 | [FieldOffset(0)]
54 | public ulong longValue;
55 | }
56 |
57 | [StructLayout(LayoutKind.Explicit)]
58 | internal struct UIntDecimal
59 | {
60 | [FieldOffset(0)]
61 | public ulong longValue1;
62 |
63 | [FieldOffset(8)]
64 | public ulong longValue2;
65 |
66 | [FieldOffset(0)]
67 | public decimal decimalValue;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Assets/Mirror/Runtime/UNetwork.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b530ce39098b54374a29ad308c8e4554
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Mirror/Version.txt:
--------------------------------------------------------------------------------
1 | 30.5.3
--------------------------------------------------------------------------------
/Assets/Mirror/Version.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c6b1f72568a9340178b4c34608fbdbc3
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8979d8be84b8c49b097cad70407acfeb
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/GameLiftServerSDKNet45.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/GameLiftServerSDKNet45.dll
--------------------------------------------------------------------------------
/Assets/Plugins/GameLiftServerSDKNet45.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e1bfb12546ca14d2391f6a527b10638a
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Plugins/Google.Protobuf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/Google.Protobuf.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Google.Protobuf.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ff0851255fe1b43f9989ad6ca4bf2831
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Plugins/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Newtonsoft.Json.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2f1e91e9f0657427abfccafc61b5613a
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Plugins/System.Buffers.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/System.Buffers.dll
--------------------------------------------------------------------------------
/Assets/Plugins/System.Buffers.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a8318ed7c561845ec83fd0b0d42b7bda
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Plugins/System.Collections.Immutable.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/System.Collections.Immutable.dll
--------------------------------------------------------------------------------
/Assets/Plugins/System.Collections.Immutable.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0e03321df71a94c28a2f3b958831ff5c
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Plugins/System.Memory.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/System.Memory.dll
--------------------------------------------------------------------------------
/Assets/Plugins/System.Memory.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3a1f9765a5d894ef3b24f8ee1a550441
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Plugins/System.Runtime.CompilerServices.Unsafe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/System.Runtime.CompilerServices.Unsafe.dll
--------------------------------------------------------------------------------
/Assets/Plugins/System.Runtime.CompilerServices.Unsafe.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 565d17e5c8aa14e76b53525b110c19b6
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Plugins/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/log4net.dll
--------------------------------------------------------------------------------
/Assets/Plugins/log4net.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 44c5eac22e3bc45d695d92f3c7a91af9
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Plugins/websocket-sharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BatteryAcid/unity-custom-gamelift-server/b23ee69136dac2874266fceee211cb268e60ca6f/Assets/Plugins/websocket-sharp.dll
--------------------------------------------------------------------------------
/Assets/Plugins/websocket-sharp.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 529c548cd676c45b19926ed83a1fb1d0
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bad1afa80c82e4335bb51b09a9135406
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes/SampleScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9fc0d4010bbf28b4594072e72b8655ab
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 970fce15e6d48490c893a2556ed76b59
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/BADNetworkMessage.cs:
--------------------------------------------------------------------------------
1 | [System.Serializable]
2 | public class BADNetworkMessage
3 | {
4 | public string _opCode;
5 | public string _playerSessionId;
6 |
7 | public BADNetworkMessage(string opCode, string playerSessionId)
8 | {
9 | _opCode = opCode;
10 | _playerSessionId = playerSessionId;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/Scripts/BADNetworkMessage.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eedb7e25835f14880aa2a692b5697585
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/BADNetworkServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7531f7f0bb2b7481a8de1bc855a4aef0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/GameLiftServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 545cb19e776794724897da46c464be38
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/Startup.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | public class Startup : MonoBehaviour
4 | {
5 | // Helper function for getting the command line arguments
6 | // src: https://stackoverflow.com/a/45578115/1956540
7 | public static bool IsArgFlagPresent(string name)
8 | {
9 | var args = System.Environment.GetCommandLineArgs();
10 | for (int i = 0; i < args.Length; i++)
11 | {
12 | if (args[i] == name)
13 | {
14 | return true;
15 | }
16 | }
17 | return false;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Assets/Scripts/Startup.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 17c816972d120450a9b186de6a27931c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 BatteryAcid
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.collab-proxy": "1.3.9",
4 | "com.unity.ide.rider": "2.0.7",
5 | "com.unity.ide.visualstudio": "2.0.5",
6 | "com.unity.ide.vscode": "1.2.3",
7 | "com.unity.test-framework": "1.1.19",
8 | "com.unity.textmeshpro": "3.0.1",
9 | "com.unity.timeline": "1.4.4",
10 | "com.unity.ugui": "1.0.0",
11 | "com.unity.modules.ai": "1.0.0",
12 | "com.unity.modules.androidjni": "1.0.0",
13 | "com.unity.modules.animation": "1.0.0",
14 | "com.unity.modules.assetbundle": "1.0.0",
15 | "com.unity.modules.audio": "1.0.0",
16 | "com.unity.modules.cloth": "1.0.0",
17 | "com.unity.modules.director": "1.0.0",
18 | "com.unity.modules.imageconversion": "1.0.0",
19 | "com.unity.modules.imgui": "1.0.0",
20 | "com.unity.modules.jsonserialize": "1.0.0",
21 | "com.unity.modules.particlesystem": "1.0.0",
22 | "com.unity.modules.physics": "1.0.0",
23 | "com.unity.modules.physics2d": "1.0.0",
24 | "com.unity.modules.screencapture": "1.0.0",
25 | "com.unity.modules.terrain": "1.0.0",
26 | "com.unity.modules.terrainphysics": "1.0.0",
27 | "com.unity.modules.tilemap": "1.0.0",
28 | "com.unity.modules.ui": "1.0.0",
29 | "com.unity.modules.uielements": "1.0.0",
30 | "com.unity.modules.umbra": "1.0.0",
31 | "com.unity.modules.unityanalytics": "1.0.0",
32 | "com.unity.modules.unitywebrequest": "1.0.0",
33 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
34 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
35 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
36 | "com.unity.modules.unitywebrequestwww": "1.0.0",
37 | "com.unity.modules.vehicles": "1.0.0",
38 | "com.unity.modules.video": "1.0.0",
39 | "com.unity.modules.vr": "1.0.0",
40 | "com.unity.modules.wind": "1.0.0",
41 | "com.unity.modules.xr": "1.0.0"
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 1024
20 |
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 | m_DefaultMaxAngluarSpeed: 7
35 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 | m_configObjects: {}
9 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 0
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 | m_EnterPlayModeOptionsEnabled: 0
27 | m_EnterPlayModeOptions: 3
28 | m_ShowLightmapResolutionOverlay: 1
29 | m_UseLegacyProbeSampleCount: 0
30 | m_SerializeInlineMappingsOnOneLine: 1
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/ProjectSettings/PackageManagerSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_EnablePreviewPackages: 0
16 | m_EnablePackageDependencies: 0
17 | m_AdvancedSettingsExpanded: 1
18 | m_ScopedRegistriesSettingsExpanded: 1
19 | oneTimeWarningShown: 0
20 | m_Registries:
21 | - m_Id: main
22 | m_Name:
23 | m_Url: https://packages.unity.com
24 | m_Scopes: []
25 | m_IsDefault: 1
26 | m_Capabilities: 7
27 | m_UserSelectedRegistryName:
28 | m_UserAddingNewScopedRegistry: 0
29 | m_RegistryInfoDraft:
30 | m_ErrorMessage:
31 | m_Original:
32 | m_Id:
33 | m_Name:
34 | m_Url:
35 | m_Scopes: []
36 | m_IsDefault: 0
37 | m_Capabilities: 0
38 | m_Modified: 0
39 | m_Name:
40 | m_Url:
41 | m_Scopes:
42 | -
43 | m_SelectedScopeIndex: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_DefaultPresets: {}
8 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2020.2.1f1
2 | m_EditorVersionWithRevision: 2020.2.1f1 (270dd8c3da1c)
3 |
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_StripUpdateShader: {fileID: 0}
10 | m_RenderPipeSettingsPath:
11 | m_FixedTimeStep: 0.016666668
12 | m_MaxDeltaTime: 0.05
13 |
--------------------------------------------------------------------------------
/ProjectSettings/VersionControlSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!890905787 &1
4 | VersionControlSettings:
5 | m_ObjectHideFlags: 0
6 | m_Mode: Visible Meta Files
7 | m_CollabEditorSettings:
8 | inProgressEnabled: 1
9 |
--------------------------------------------------------------------------------
/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------