Assets/Plugins/NativeWebSocket.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 3c2e7c19cc229974bbada1904c14be65 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 5626c76d5ed6b8e419bab08bf324336a folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets/Samples~/WebSocketExample/Connection.cs
New file @@ -0,0 +1,69 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using NativeWebSocket; public class Connection : MonoBehaviour { WebSocket websocket; // Start is called before the first frame update async void Start() { // websocket = new WebSocket("ws://echo.websocket.org"); websocket = new WebSocket("ws://localhost:3000"); websocket.OnOpen += () => { Debug.Log("Connection open!"); }; websocket.OnError += (e) => { Debug.Log("Error! " + e); }; websocket.OnClose += (e) => { Debug.Log("Connection closed!"); }; websocket.OnMessage += (bytes) => { // Reading a plain text message var message = System.Text.Encoding.UTF8.GetString(bytes); Debug.Log("Received OnMessage! (" + bytes.Length + " bytes) " + message); }; // Keep sending messages at every 0.3s InvokeRepeating("SendWebSocketMessage", 0.0f, 0.3f); await websocket.Connect(); } void Update() { #if !UNITY_WEBGL || UNITY_EDITOR websocket.DispatchMessageQueue(); #endif } async void SendWebSocketMessage() { if (websocket.State == WebSocketState.Open) { // Sending bytes await websocket.Send(new byte[] { 10, 20, 30 }); // Sending plain text await websocket.SendText("plain text message"); } } private async void OnApplicationQuit() { await websocket.Close(); } } Assets/Plugins/NativeWebSocket/Assets/Samples~/WebSocketExample/Connection.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 0f451fab1e6d94aea8fb73803e281bb3 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets/Samples~/WebSocketExample/WebSocketExampleScene.unity
New file @@ -0,0 +1,326 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 705507994} m_IndirectSpecularColor: {r: 0.44657868, g: 0.49641263, b: 0.57481706, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: serializedVersion: 12 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_ExtractAmbientOcclusion: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 m_PVREnvironmentSampleCount: 500 m_PVREnvironmentReferencePointCount: 2048 m_PVRFilteringMode: 2 m_PVRDenoiserTypeDirect: 0 m_PVRDenoiserTypeIndirect: 0 m_PVRDenoiserTypeAO: 0 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVREnvironmentMIS: 0 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &705507993 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 705507995} - component: {fileID: 705507994} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &705507994 Light: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 705507993} m_Enabled: 1 serializedVersion: 9 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_InnerSpotAngle: 21.802082 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: -1 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.05 m_NormalBias: 0.4 m_NearPlane: 0.2 m_CullingMatrixOverride: e00: 1 e01: 0 e02: 0 e03: 0 e10: 0 e11: 1 e12: 0 e13: 0 e20: 0 e21: 0 e22: 1 e23: 0 e30: 0 e31: 0 e32: 0 e33: 1 m_UseCullingMatrixOverride: 0 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingLayerMask: 1 m_Lightmapping: 1 m_LightShadowCasterMode: 0 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &705507995 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 705507993} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &963194225 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 963194228} - component: {fileID: 963194227} - component: {fileID: 963194226} - component: {fileID: 963194230} - component: {fileID: 963194229} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &963194226 AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} m_Enabled: 1 --- !u!20 &963194227 Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 60 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &963194228 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &963194229 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0f451fab1e6d94aea8fb73803e281bb3, type: 3} m_Name: m_EditorClassIdentifier: --- !u!54 &963194230 Rigidbody: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} serializedVersion: 2 m_Mass: 1 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 m_IsKinematic: 0 m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 Assets/Plugins/NativeWebSocket/Assets/Samples~/WebSocketExample/WebSocketExampleScene.unity.meta
New file @@ -0,0 +1,7 @@ fileFormatVersion: 2 guid: 9fc0d4010bbf28b4594072e72b8655ab DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets/WebSocket.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 1b0aac75ea12c4d6d8aaf04e069a69a7 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets/WebSocket/WebSocket.cs
New file @@ -0,0 +1,871 @@ using System; using System.Collections.Generic; using System.IO; using System.Net.WebSockets; using System.Runtime.CompilerServices; using System.Text; using System.Threading; using System.Threading.Tasks; using AOT; using System.Runtime.InteropServices; using UnityEngine; using System.Collections; public class MainThreadUtil : MonoBehaviour { public static MainThreadUtil Instance { get; private set; } public static SynchronizationContext synchronizationContext { get; private set; } [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] public static void Setup() { Instance = new GameObject("MainThreadUtil") .AddComponent<MainThreadUtil>(); synchronizationContext = SynchronizationContext.Current; } public static void Run(IEnumerator waitForUpdate) { synchronizationContext.Post(_ => Instance.StartCoroutine( waitForUpdate), null); } void Awake() { gameObject.hideFlags = HideFlags.HideAndDontSave; DontDestroyOnLoad(gameObject); } } public class WaitForUpdate : CustomYieldInstruction { public override bool keepWaiting { get { return false; } } public MainThreadAwaiter GetAwaiter() { var awaiter = new MainThreadAwaiter(); MainThreadUtil.Run(CoroutineWrapper(this, awaiter)); return awaiter; } public class MainThreadAwaiter : INotifyCompletion { Action continuation; public bool IsCompleted { get; set; } public void GetResult() { } public void Complete() { IsCompleted = true; continuation?.Invoke(); } void INotifyCompletion.OnCompleted(Action continuation) { this.continuation = continuation; } } public static IEnumerator CoroutineWrapper(IEnumerator theWorker, MainThreadAwaiter awaiter) { yield return theWorker; awaiter.Complete(); } } namespace NativeWebSocket { public delegate void WebSocketOpenEventHandler(); public delegate void WebSocketMessageEventHandler(byte[] data); public delegate void WebSocketErrorEventHandler(string errorMsg); public delegate void WebSocketCloseEventHandler(WebSocketCloseCode closeCode); public enum WebSocketCloseCode { /* Do NOT use NotSet - it's only purpose is to indicate that the close code cannot be parsed. */ NotSet = 0, Normal = 1000, Away = 1001, ProtocolError = 1002, UnsupportedData = 1003, Undefined = 1004, NoStatus = 1005, Abnormal = 1006, InvalidData = 1007, PolicyViolation = 1008, TooBig = 1009, MandatoryExtension = 1010, ServerError = 1011, TlsHandshakeFailure = 1015 } public enum WebSocketState { Connecting, Open, Closing, Closed } public interface IWebSocket { event WebSocketOpenEventHandler OnOpen; event WebSocketMessageEventHandler OnMessage; event WebSocketErrorEventHandler OnError; event WebSocketCloseEventHandler OnClose; WebSocketState State { get; } } public static class WebSocketHelpers { public static WebSocketCloseCode ParseCloseCodeEnum(int closeCode) { if (WebSocketCloseCode.IsDefined(typeof(WebSocketCloseCode), closeCode)) { return (WebSocketCloseCode)closeCode; } else { return WebSocketCloseCode.Undefined; } } public static WebSocketException GetErrorMessageFromCode(int errorCode, Exception inner) { switch (errorCode) { case -1: return new WebSocketUnexpectedException("WebSocket instance not found.", inner); case -2: return new WebSocketInvalidStateException("WebSocket is already connected or in connecting state.", inner); case -3: return new WebSocketInvalidStateException("WebSocket is not connected.", inner); case -4: return new WebSocketInvalidStateException("WebSocket is already closing.", inner); case -5: return new WebSocketInvalidStateException("WebSocket is already closed.", inner); case -6: return new WebSocketInvalidStateException("WebSocket is not in open state.", inner); case -7: return new WebSocketInvalidArgumentException("Cannot close WebSocket. An invalid code was specified or reason is too long.", inner); default: return new WebSocketUnexpectedException("Unknown error.", inner); } } } public class WebSocketException : Exception { public WebSocketException() { } public WebSocketException(string message) : base(message) { } public WebSocketException(string message, Exception inner) : base(message, inner) { } } public class WebSocketUnexpectedException : WebSocketException { public WebSocketUnexpectedException() { } public WebSocketUnexpectedException(string message) : base(message) { } public WebSocketUnexpectedException(string message, Exception inner) : base(message, inner) { } } public class WebSocketInvalidArgumentException : WebSocketException { public WebSocketInvalidArgumentException() { } public WebSocketInvalidArgumentException(string message) : base(message) { } public WebSocketInvalidArgumentException(string message, Exception inner) : base(message, inner) { } } public class WebSocketInvalidStateException : WebSocketException { public WebSocketInvalidStateException() { } public WebSocketInvalidStateException(string message) : base(message) { } public WebSocketInvalidStateException(string message, Exception inner) : base(message, inner) { } } public class WaitForBackgroundThread { public ConfiguredTaskAwaitable.ConfiguredTaskAwaiter GetAwaiter() { return Task.Run(() => { }).ConfigureAwait(false).GetAwaiter(); } } #if UNITY_WEBGL && !UNITY_EDITOR /// <summary> /// WebSocket class bound to JSLIB. /// </summary> public class WebSocket : IWebSocket { /* WebSocket JSLIB functions */ [DllImport ("__Internal")] public static extern int WebSocketConnect (int instanceId); [DllImport ("__Internal")] public static extern int WebSocketClose (int instanceId, int code, string reason); [DllImport ("__Internal")] public static extern int WebSocketSend (int instanceId, byte[] dataPtr, int dataLength); [DllImport ("__Internal")] public static extern int WebSocketSendText (int instanceId, string message); [DllImport ("__Internal")] public static extern int WebSocketGetState (int instanceId); protected int instanceId; public event WebSocketOpenEventHandler OnOpen; public event WebSocketMessageEventHandler OnMessage; public event WebSocketErrorEventHandler OnError; public event WebSocketCloseEventHandler OnClose; public WebSocket (string url, Dictionary<string, string> headers = null) { if (!WebSocketFactory.isInitialized) { WebSocketFactory.Initialize (); } int instanceId = WebSocketFactory.WebSocketAllocate (url); WebSocketFactory.instances.Add (instanceId, this); this.instanceId = instanceId; } public WebSocket (string url, string subprotocol, Dictionary<string, string> headers = null) { if (!WebSocketFactory.isInitialized) { WebSocketFactory.Initialize (); } int instanceId = WebSocketFactory.WebSocketAllocate (url); WebSocketFactory.instances.Add (instanceId, this); WebSocketFactory.WebSocketAddSubProtocol(instanceId, subprotocol); this.instanceId = instanceId; } public WebSocket (string url, List<string> subprotocols, Dictionary<string, string> headers = null) { if (!WebSocketFactory.isInitialized) { WebSocketFactory.Initialize (); } int instanceId = WebSocketFactory.WebSocketAllocate (url); WebSocketFactory.instances.Add (instanceId, this); foreach (string subprotocol in subprotocols) { WebSocketFactory.WebSocketAddSubProtocol(instanceId, subprotocol); } this.instanceId = instanceId; } ~WebSocket () { WebSocketFactory.HandleInstanceDestroy (this.instanceId); } public int GetInstanceId () { return this.instanceId; } public Task Connect () { int ret = WebSocketConnect (this.instanceId); if (ret < 0) throw WebSocketHelpers.GetErrorMessageFromCode (ret, null); return Task.CompletedTask; } public void CancelConnection () { if (State == WebSocketState.Open) Close (WebSocketCloseCode.Abnormal); } public Task Close (WebSocketCloseCode code = WebSocketCloseCode.Normal, string reason = null) { int ret = WebSocketClose (this.instanceId, (int) code, reason); if (ret < 0) throw WebSocketHelpers.GetErrorMessageFromCode (ret, null); return Task.CompletedTask; } public Task Send (byte[] data) { int ret = WebSocketSend (this.instanceId, data, data.Length); if (ret < 0) throw WebSocketHelpers.GetErrorMessageFromCode (ret, null); return Task.CompletedTask; } public Task SendText (string message) { int ret = WebSocketSendText (this.instanceId, message); if (ret < 0) throw WebSocketHelpers.GetErrorMessageFromCode (ret, null); return Task.CompletedTask; } public WebSocketState State { get { int state = WebSocketGetState (this.instanceId); if (state < 0) throw WebSocketHelpers.GetErrorMessageFromCode (state, null); switch (state) { case 0: return WebSocketState.Connecting; case 1: return WebSocketState.Open; case 2: return WebSocketState.Closing; case 3: return WebSocketState.Closed; default: return WebSocketState.Closed; } } } public void DelegateOnOpenEvent () { this.OnOpen?.Invoke (); } public void DelegateOnMessageEvent (byte[] data) { this.OnMessage?.Invoke (data); } public void DelegateOnErrorEvent (string errorMsg) { this.OnError?.Invoke (errorMsg); } public void DelegateOnCloseEvent (int closeCode) { this.OnClose?.Invoke (WebSocketHelpers.ParseCloseCodeEnum (closeCode)); } } #else public class WebSocket : IWebSocket { public event WebSocketOpenEventHandler OnOpen; public event WebSocketMessageEventHandler OnMessage; public event WebSocketErrorEventHandler OnError; public event WebSocketCloseEventHandler OnClose; private Uri uri; private Dictionary<string, string> headers; private List<string> subprotocols; private ClientWebSocket m_Socket = new ClientWebSocket(); private CancellationTokenSource m_TokenSource; private CancellationToken m_CancellationToken; private readonly object OutgoingMessageLock = new object(); private readonly object IncomingMessageLock = new object(); private bool isSending = false; private List<ArraySegment<byte>> sendBytesQueue = new List<ArraySegment<byte>>(); private List<ArraySegment<byte>> sendTextQueue = new List<ArraySegment<byte>>(); public WebSocket(string url, Dictionary<string, string> headers = null) { uri = new Uri(url); if (headers == null) { this.headers = new Dictionary<string, string>(); } else { this.headers = headers; } subprotocols = new List<string>(); string protocol = uri.Scheme; if (!protocol.Equals("ws") && !protocol.Equals("wss")) throw new ArgumentException("Unsupported protocol: " + protocol); } public WebSocket(string url, string subprotocol, Dictionary<string, string> headers = null) { uri = new Uri(url); if (headers == null) { this.headers = new Dictionary<string, string>(); } else { this.headers = headers; } subprotocols = new List<string> {subprotocol}; string protocol = uri.Scheme; if (!protocol.Equals("ws") && !protocol.Equals("wss")) throw new ArgumentException("Unsupported protocol: " + protocol); } public WebSocket(string url, List<string> subprotocols, Dictionary<string, string> headers = null) { uri = new Uri(url); if (headers == null) { this.headers = new Dictionary<string, string>(); } else { this.headers = headers; } this.subprotocols = subprotocols; string protocol = uri.Scheme; if (!protocol.Equals("ws") && !protocol.Equals("wss")) throw new ArgumentException("Unsupported protocol: " + protocol); } public void CancelConnection() { m_TokenSource?.Cancel(); } public async Task Connect() { try { m_TokenSource = new CancellationTokenSource(); m_CancellationToken = m_TokenSource.Token; m_Socket = new ClientWebSocket(); foreach (var header in headers) { m_Socket.Options.SetRequestHeader(header.Key, header.Value); } foreach (string subprotocol in subprotocols) { m_Socket.Options.AddSubProtocol(subprotocol); } await m_Socket.ConnectAsync(uri, m_CancellationToken); Debug.Log($"[NativeWebSocket] ConnectAsync 完成, Socket.State = {m_Socket.State}"); OnOpen?.Invoke(); Debug.Log("[NativeWebSocket] 开始进入 Receive 循环..."); await Receive(); Debug.Log("[NativeWebSocket] Receive 循环已返回"); } catch (Exception ex) { Debug.LogError($"[NativeWebSocket] Connect/Receive 异常: {ex.GetType().Name}: {ex.Message}"); OnError?.Invoke(ex.Message); OnClose?.Invoke(WebSocketCloseCode.Abnormal); } finally { if (m_Socket != null) { m_TokenSource.Cancel(); m_Socket.Dispose(); } } } public WebSocketState State { get { switch (m_Socket.State) { case System.Net.WebSockets.WebSocketState.Connecting: return WebSocketState.Connecting; case System.Net.WebSockets.WebSocketState.Open: return WebSocketState.Open; case System.Net.WebSockets.WebSocketState.CloseSent: case System.Net.WebSockets.WebSocketState.CloseReceived: return WebSocketState.Closing; case System.Net.WebSockets.WebSocketState.Closed: return WebSocketState.Closed; default: return WebSocketState.Closed; } } } public Task Send(byte[] bytes) { // return m_Socket.SendAsync(buffer, WebSocketMessageType.Binary, true, CancellationToken.None); return SendMessage(sendBytesQueue, WebSocketMessageType.Binary, new ArraySegment<byte>(bytes)); } public Task SendText(string message) { var encoded = Encoding.UTF8.GetBytes(message); // m_Socket.SendAsync(buffer, WebSocketMessageType.Text, true, CancellationToken.None); return SendMessage(sendTextQueue, WebSocketMessageType.Text, new ArraySegment<byte>(encoded, 0, encoded.Length)); } private async Task SendMessage(List<ArraySegment<byte>> queue, WebSocketMessageType messageType, ArraySegment<byte> buffer) { // Return control to the calling method immediately. // await Task.Yield (); // Make sure we have data. if (buffer.Count == 0) { return; } // The state of the connection is contained in the context Items dictionary. bool sending; lock (OutgoingMessageLock) { sending = isSending; // If not, we are now. if (!isSending) { isSending = true; } } if (!sending) { // Lock with a timeout, just in case. if (!Monitor.TryEnter(m_Socket, 1000)) { // If we couldn't obtain exclusive access to the socket in one second, something is wrong. await m_Socket.CloseAsync(WebSocketCloseStatus.InternalServerError, string.Empty, m_CancellationToken); return; } try { // Send the message synchronously. var t = m_Socket.SendAsync(buffer, messageType, true, m_CancellationToken); t.Wait(m_CancellationToken); } finally { Monitor.Exit(m_Socket); // Note that we've finished sending. lock (OutgoingMessageLock) { isSending = false; } } // Handle any queued messages. await HandleQueue(queue, messageType); } else { // Add the message to the queue. lock (OutgoingMessageLock) { queue.Add(buffer); } } } private async Task HandleQueue(List<ArraySegment<byte>> queue, WebSocketMessageType messageType) { var buffer = new ArraySegment<byte>(); lock (OutgoingMessageLock) { // Check for an item in the queue. if (queue.Count > 0) { // Pull it off the top. buffer = queue[0]; queue.RemoveAt(0); } } // Send that message. if (buffer.Count > 0) { await SendMessage(queue, messageType, buffer); } } private List<byte[]> m_MessageList = new List<byte[]>(); // simple dispatcher for queued messages. public void DispatchMessageQueue() { if (m_MessageList.Count == 0) { return; } List<byte[]> messageListCopy; lock (IncomingMessageLock) { messageListCopy = new List<byte[]>(m_MessageList); m_MessageList.Clear(); } var len = messageListCopy.Count; for (int i = 0; i < len; i++) { OnMessage?.Invoke(messageListCopy[i]); } } public async Task Receive() { WebSocketCloseCode closeCode = WebSocketCloseCode.Abnormal; await new WaitForBackgroundThread(); Debug.Log($"[NativeWebSocket] Receive 循环开始, Socket.State = {m_Socket.State}"); int messageCount = 0; ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[8192]); try { while (m_Socket.State == System.Net.WebSockets.WebSocketState.Open) { WebSocketReceiveResult result = null; using (var ms = new MemoryStream()) { do { result = await m_Socket.ReceiveAsync(buffer, m_CancellationToken); ms.Write(buffer.Array, buffer.Offset, result.Count); } while (!result.EndOfMessage); ms.Seek(0, SeekOrigin.Begin); if (result.MessageType == WebSocketMessageType.Text) { messageCount++; Debug.Log($"[NativeWebSocket] 📩 收到文本消息 #{messageCount}, 大小: {ms.Length} bytes"); lock (IncomingMessageLock) { m_MessageList.Add(ms.ToArray()); } //using (var reader = new StreamReader(ms, Encoding.UTF8)) //{ // string message = reader.ReadToEnd(); // OnMessage?.Invoke(this, new MessageEventArgs(message)); //} } else if (result.MessageType == WebSocketMessageType.Binary) { messageCount++; Debug.Log($"[NativeWebSocket] 📩 收到二进制消息 #{messageCount}, 大小: {ms.Length} bytes"); lock (IncomingMessageLock) { m_MessageList.Add(ms.ToArray()); } } else if (result.MessageType == WebSocketMessageType.Close) { Debug.LogWarning($"[NativeWebSocket] 📩 收到 Close 消息! (总共接收了 {messageCount} 条消息)"); Debug.LogWarning($"[NativeWebSocket] CloseStatus={result.CloseStatus}, CloseStatusDescription={result.CloseStatusDescription}"); await Close(); closeCode = WebSocketHelpers.ParseCloseCodeEnum((int)result.CloseStatus); Debug.LogWarning($"[NativeWebSocket] 解析关闭代码: {closeCode}"); break; } } } // 如果循环正常退出(而非 break),说明 socket 状态改变了 if (m_Socket.State != System.Net.WebSockets.WebSocketState.Open) { Debug.LogWarning($"[NativeWebSocket] while 循环退出: Socket.State 变为 {m_Socket.State} (总共接收了 {messageCount} 条消息)"); } } catch (Exception ex) { Debug.LogError($"[NativeWebSocket] Receive 循环异常: {ex.GetType().Name}: {ex.Message}"); Debug.LogError($"[NativeWebSocket] 异常堆栈:\n{ex.StackTrace}"); m_TokenSource.Cancel(); } finally { Debug.LogWarning($"[NativeWebSocket] Receive 循环结束, Socket.State = {m_Socket.State}, 准备触发 OnClose({closeCode})"); await new WaitForUpdate(); OnClose?.Invoke(closeCode); } } public async Task Close() { if (State == WebSocketState.Open) { await m_Socket.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, m_CancellationToken); } } } #endif /// /// Factory /// /// <summary> /// Class providing static access methods to work with JSLIB WebSocket or WebSocketSharp interface /// </summary> public static class WebSocketFactory { #if UNITY_WEBGL && !UNITY_EDITOR /* Map of websocket instances */ public static Dictionary<Int32, WebSocket> instances = new Dictionary<Int32, WebSocket> (); /* Delegates */ public delegate void OnOpenCallback (int instanceId); public delegate void OnMessageCallback (int instanceId, System.IntPtr msgPtr, int msgSize); public delegate void OnErrorCallback (int instanceId, System.IntPtr errorPtr); public delegate void OnCloseCallback (int instanceId, int closeCode); /* WebSocket JSLIB callback setters and other functions */ [DllImport ("__Internal")] public static extern int WebSocketAllocate (string url); [DllImport ("__Internal")] public static extern int WebSocketAddSubProtocol (int instanceId, string subprotocol); [DllImport ("__Internal")] public static extern void WebSocketFree (int instanceId); [DllImport ("__Internal")] public static extern void WebSocketSetOnOpen (OnOpenCallback callback); [DllImport ("__Internal")] public static extern void WebSocketSetOnMessage (OnMessageCallback callback); [DllImport ("__Internal")] public static extern void WebSocketSetOnError (OnErrorCallback callback); [DllImport ("__Internal")] public static extern void WebSocketSetOnClose (OnCloseCallback callback); /* If callbacks was initialized and set */ public static bool isInitialized = false; /* * Initialize WebSocket callbacks to JSLIB */ public static void Initialize () { WebSocketSetOnOpen (DelegateOnOpenEvent); WebSocketSetOnMessage (DelegateOnMessageEvent); WebSocketSetOnError (DelegateOnErrorEvent); WebSocketSetOnClose (DelegateOnCloseEvent); isInitialized = true; } /// <summary> /// Called when instance is destroyed (by destructor) /// Method removes instance from map and free it in JSLIB implementation /// </summary> /// <param name="instanceId">Instance identifier.</param> public static void HandleInstanceDestroy (int instanceId) { instances.Remove (instanceId); WebSocketFree (instanceId); } [MonoPInvokeCallback (typeof (OnOpenCallback))] public static void DelegateOnOpenEvent (int instanceId) { WebSocket instanceRef; if (instances.TryGetValue (instanceId, out instanceRef)) { instanceRef.DelegateOnOpenEvent (); } } [MonoPInvokeCallback (typeof (OnMessageCallback))] public static void DelegateOnMessageEvent (int instanceId, System.IntPtr msgPtr, int msgSize) { WebSocket instanceRef; if (instances.TryGetValue (instanceId, out instanceRef)) { byte[] msg = new byte[msgSize]; Marshal.Copy (msgPtr, msg, 0, msgSize); instanceRef.DelegateOnMessageEvent (msg); } } [MonoPInvokeCallback (typeof (OnErrorCallback))] public static void DelegateOnErrorEvent (int instanceId, System.IntPtr errorPtr) { WebSocket instanceRef; if (instances.TryGetValue (instanceId, out instanceRef)) { string errorMsg = Marshal.PtrToStringAuto (errorPtr); instanceRef.DelegateOnErrorEvent (errorMsg); } } [MonoPInvokeCallback (typeof (OnCloseCallback))] public static void DelegateOnCloseEvent (int instanceId, int closeCode) { WebSocket instanceRef; if (instances.TryGetValue (instanceId, out instanceRef)) { instanceRef.DelegateOnCloseEvent (closeCode); } } #endif /// <summary> /// Create WebSocket client instance /// </summary> /// <returns>The WebSocket instance.</returns> /// <param name="url">WebSocket valid URL.</param> public static WebSocket CreateInstance(string url) { return new WebSocket(url); } } } Assets/Plugins/NativeWebSocket/Assets/WebSocket/WebSocket.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: df0e653fbf9005342904aa0f14d46088 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets/WebSocket/WebSocket.jslib
New file @@ -0,0 +1,333 @@ var LibraryWebSocket = { $webSocketState: { /* * Map of instances * * Instance structure: * { * url: string, * ws: WebSocket * } */ instances: {}, /* Last instance ID */ lastId: 0, /* Event listeners */ onOpen: null, onMessage: null, onError: null, onClose: null, /* Debug mode */ debug: false }, /** * Set onOpen callback * * @param callback Reference to C# static function */ WebSocketSetOnOpen: function(callback) { webSocketState.onOpen = callback; }, /** * Set onMessage callback * * @param callback Reference to C# static function */ WebSocketSetOnMessage: function(callback) { webSocketState.onMessage = callback; }, /** * Set onError callback * * @param callback Reference to C# static function */ WebSocketSetOnError: function(callback) { webSocketState.onError = callback; }, /** * Set onClose callback * * @param callback Reference to C# static function */ WebSocketSetOnClose: function(callback) { webSocketState.onClose = callback; }, /** * Allocate new WebSocket instance struct * * @param url Server URL */ WebSocketAllocate: function(url) { var urlStr = UTF8ToString(url); var id = webSocketState.lastId++; webSocketState.instances[id] = { subprotocols: [], url: urlStr, ws: null }; return id; }, /** * Add subprotocol to instance * * @param instanceId Instance ID * @param subprotocol Subprotocol name to add to instance */ WebSocketAddSubProtocol: function(instanceId, subprotocol) { var subprotocolStr = UTF8ToString(subprotocol); webSocketState.instances[instanceId].subprotocols.push(subprotocolStr); }, /** * Remove reference to WebSocket instance * * If socket is not closed function will close it but onClose event will not be emitted because * this function should be invoked by C# WebSocket destructor. * * @param instanceId Instance ID */ WebSocketFree: function(instanceId) { var instance = webSocketState.instances[instanceId]; if (!instance) return 0; // Close if not closed if (instance.ws && instance.ws.readyState < 2) instance.ws.close(); // Remove reference delete webSocketState.instances[instanceId]; return 0; }, /** * Connect WebSocket to the server * * @param instanceId Instance ID */ WebSocketConnect: function(instanceId) { var instance = webSocketState.instances[instanceId]; if (!instance) return -1; if (instance.ws !== null) return -2; instance.ws = new WebSocket(instance.url, instance.subprotocols); instance.ws.binaryType = 'arraybuffer'; instance.ws.onopen = function() { if (webSocketState.debug) console.log("[JSLIB WebSocket] Connected."); if (webSocketState.onOpen) Module.dynCall_vi(webSocketState.onOpen, instanceId); }; instance.ws.onmessage = function(ev) { if (webSocketState.debug) console.log("[JSLIB WebSocket] Received message:", ev.data); if (webSocketState.onMessage === null) return; if (ev.data instanceof ArrayBuffer) { var dataBuffer = new Uint8Array(ev.data); var buffer = _malloc(dataBuffer.length); HEAPU8.set(dataBuffer, buffer); try { Module.dynCall_viii(webSocketState.onMessage, instanceId, buffer, dataBuffer.length); } finally { _free(buffer); } } else { var dataBuffer = (new TextEncoder()).encode(ev.data); var buffer = _malloc(dataBuffer.length); HEAPU8.set(dataBuffer, buffer); try { Module.dynCall_viii(webSocketState.onMessage, instanceId, buffer, dataBuffer.length); } finally { _free(buffer); } } }; instance.ws.onerror = function(ev) { if (webSocketState.debug) console.log("[JSLIB WebSocket] Error occured."); if (webSocketState.onError) { var msg = "WebSocket error."; var length = lengthBytesUTF8(msg) + 1; var buffer = _malloc(length); stringToUTF8(msg, buffer, length); try { Module.dynCall_vii(webSocketState.onError, instanceId, buffer); } finally { _free(buffer); } } }; instance.ws.onclose = function(ev) { if (webSocketState.debug) console.log("[JSLIB WebSocket] Closed."); if (webSocketState.onClose) Module.dynCall_vii(webSocketState.onClose, instanceId, ev.code); delete instance.ws; }; return 0; }, /** * Close WebSocket connection * * @param instanceId Instance ID * @param code Close status code * @param reasonPtr Pointer to reason string */ WebSocketClose: function(instanceId, code, reasonPtr) { var instance = webSocketState.instances[instanceId]; if (!instance) return -1; if (!instance.ws) return -3; if (instance.ws.readyState === 2) return -4; if (instance.ws.readyState === 3) return -5; var reason = ( reasonPtr ? UTF8ToString(reasonPtr) : undefined ); try { instance.ws.close(code, reason); } catch(err) { return -7; } return 0; }, /** * Send message over WebSocket * * @param instanceId Instance ID * @param bufferPtr Pointer to the message buffer * @param length Length of the message in the buffer */ WebSocketSend: function(instanceId, bufferPtr, length) { var instance = webSocketState.instances[instanceId]; if (!instance) return -1; if (!instance.ws) return -3; if (instance.ws.readyState !== 1) return -6; instance.ws.send(HEAPU8.buffer.slice(bufferPtr, bufferPtr + length)); return 0; }, /** * Send text message over WebSocket * * @param instanceId Instance ID * @param bufferPtr Pointer to the message buffer * @param length Length of the message in the buffer */ WebSocketSendText: function(instanceId, message) { var instance = webSocketState.instances[instanceId]; if (!instance) return -1; if (!instance.ws) return -3; if (instance.ws.readyState !== 1) return -6; instance.ws.send(UTF8ToString(message)); return 0; }, /** * Return WebSocket readyState * * @param instanceId Instance ID */ WebSocketGetState: function(instanceId) { var instance = webSocketState.instances[instanceId]; if (!instance) return -1; if (instance.ws) return instance.ws.readyState; else return 3; } }; autoAddDeps(LibraryWebSocket, '$webSocketState'); mergeInto(LibraryManager.library, LibraryWebSocket); Assets/Plugins/NativeWebSocket/Assets/WebSocket/WebSocket.jslib.meta
New file @@ -0,0 +1,32 @@ fileFormatVersion: 2 guid: 3b767cc116f846f4b813fe00142b8736 PluginImporter: externalObjects: {} serializedVersion: 2 iconMap: {} executionOrder: {} defineConstraints: [] isPreloaded: 0 isOverridable: 0 isExplicitlyReferenced: 0 validateReferences: 1 platformData: - first: Any: second: enabled: 0 settings: {} - first: Editor: Editor second: enabled: 0 settings: DefaultValueInitialized: true - first: WebGL: WebGL second: enabled: 1 settings: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets/WebSocket/endel.nativewebsocket.asmdef
New file @@ -0,0 +1,3 @@ { "name": "endel.nativewebsocket" } Assets/Plugins/NativeWebSocket/Assets/WebSocket/endel.nativewebsocket.asmdef.meta
New file @@ -0,0 +1,7 @@ fileFormatVersion: 2 guid: 04376767bc1f3b428aefa3d20743e819 AssemblyDefinitionImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets/WebSocketExample.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: e7a91621cd77941248ad2d795977b3c7 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Assets/package.json
New file @@ -0,0 +1,30 @@ { "name": "com.endel.nativewebsocket", "version": "1.1.5", "description": "WebSocket client for Unity - with no external dependencies (WebGL, Native, Android, iOS, UWP).", "license": "Apache 2.0", "repository": { "type": "git", "url": "https://github.com/endel/NativeWebSocket.git" }, "author": { "name": "Endel Dreyer", "email": "endel.dreyer@gmail.com", "url": "https://github.com/endel/NativeWebSocket" }, "keywords": [ "websocket", "websockets", "native websocket", "native websockets" ], "displayName": "Native WebSockets", "unity": "2019.1", "dependencies": {}, "samples": [ { "displayName": "Example", "description": "WebSocket Example", "path": "Samples~/WebSocketExample" } ] } Assets/Plugins/NativeWebSocket/Assets/package.json.meta
New file @@ -0,0 +1,7 @@ fileFormatVersion: 2 guid: a9f6363663f95e3499b2616618078182 TextScriptImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Packages.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 8bbc55076af30414ca675b35a87b65b1 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/Packages/manifest.json
New file @@ -0,0 +1,44 @@ { "dependencies": { "com.unity.collab-proxy": "1.15.7", "com.unity.ext.nunit": "1.0.6", "com.unity.ide.rider": "3.0.9", "com.unity.ide.visualstudio": "2.0.14", "com.unity.ide.vscode": "1.2.4", "com.unity.test-framework": "1.1.29", "com.unity.textmeshpro": "3.0.6", "com.unity.timeline": "1.6.3", "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", "com.unity.modules.audio": "1.0.0", "com.unity.modules.cloth": "1.0.0", "com.unity.modules.director": "1.0.0", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.particlesystem": "1.0.0", "com.unity.modules.physics": "1.0.0", "com.unity.modules.physics2d": "1.0.0", "com.unity.modules.screencapture": "1.0.0", "com.unity.modules.terrain": "1.0.0", "com.unity.modules.terrainphysics": "1.0.0", "com.unity.modules.tilemap": "1.0.0", "com.unity.modules.ui": "1.0.0", "com.unity.modules.uielements": "1.0.0", "com.unity.modules.umbra": "1.0.0", "com.unity.modules.unityanalytics": "1.0.0", "com.unity.modules.unitywebrequest": "1.0.0", "com.unity.modules.unitywebrequestassetbundle": "1.0.0", "com.unity.modules.unitywebrequestaudio": "1.0.0", "com.unity.modules.unitywebrequesttexture": "1.0.0", "com.unity.modules.unitywebrequestwww": "1.0.0", "com.unity.modules.vehicles": "1.0.0", "com.unity.modules.video": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0" } } Assets/Plugins/NativeWebSocket/Packages/manifest.json.meta
New file @@ -0,0 +1,7 @@ fileFormatVersion: 2 guid: 5b24aa2b7a69d74408d58938eff2e11f TextScriptImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 6e40619030428ac4f991e5091c1c0a15 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/AudioManager.asset
New file @@ -0,0 +1,19 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!11 &1 AudioManager: m_ObjectHideFlags: 0 serializedVersion: 2 m_Volume: 1 Rolloff Scale: 1 Doppler Factor: 1 Default Speaker Mode: 2 m_SampleRate: 0 m_DSPBufferSize: 1024 m_VirtualVoiceCount: 512 m_RealVoiceCount: 32 m_SpatializerPlugin: m_AmbisonicDecoderPlugin: m_DisableAudio: 0 m_VirtualizeEffects: 1 m_RequestedDSPBufferSize: 1024 Assets/Plugins/NativeWebSocket/ProjectSettings/AudioManager.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 184d050d48821ad4e96803db836be878 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/ClusterInputManager.asset
New file @@ -0,0 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!236 &1 ClusterInputManager: m_ObjectHideFlags: 0 m_Inputs: [] Assets/Plugins/NativeWebSocket/ProjectSettings/ClusterInputManager.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 6d7e0816e1f6f954f980a63fcec873a3 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/DynamicsManager.asset
New file @@ -0,0 +1,34 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!55 &1 PhysicsManager: m_ObjectHideFlags: 0 serializedVersion: 11 m_Gravity: {x: 0, y: -9.81, z: 0} m_DefaultMaterial: {fileID: 0} m_BounceThreshold: 2 m_SleepThreshold: 0.005 m_DefaultContactOffset: 0.01 m_DefaultSolverIterations: 6 m_DefaultSolverVelocityIterations: 1 m_QueriesHitBackfaces: 0 m_QueriesHitTriggers: 1 m_EnableAdaptiveForce: 0 m_ClothInterCollisionDistance: 0 m_ClothInterCollisionStiffness: 0 m_ContactsGeneration: 1 m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff m_AutoSimulation: 1 m_AutoSyncTransforms: 0 m_ReuseCollisionCallbacks: 1 m_ClothInterCollisionSettingsToggle: 0 m_ContactPairsMode: 0 m_BroadphaseType: 0 m_WorldBounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 250, y: 250, z: 250} m_WorldSubdivisions: 8 m_FrictionType: 0 m_EnableEnhancedDeterminism: 0 m_EnableUnifiedHeightmaps: 1 m_DefaultMaxAngluarSpeed: 7 Assets/Plugins/NativeWebSocket/ProjectSettings/DynamicsManager.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 4b0aa778b779eed47beaf00949f3c6e0 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/EditorBuildSettings.asset
New file @@ -0,0 +1,8 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!1045 &1 EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: [] m_configObjects: {} Assets/Plugins/NativeWebSocket/ProjectSettings/EditorBuildSettings.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 5811c637782239240a969e11a0bb0ad4 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/EditorSettings.asset
New file @@ -0,0 +1,39 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!159 &1 EditorSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_SerializationMode: 2 m_LineEndingsForNewScripts: 2 m_DefaultBehaviorMode: 0 m_PrefabRegularEnvironment: {fileID: 0} m_PrefabUIEnvironment: {fileID: 0} m_SpritePackerMode: 0 m_SpritePackerPaddingPower: 1 m_EtcTextureCompressorBehavior: 1 m_EtcTextureFastCompressor: 1 m_EtcTextureNormalCompressor: 2 m_EtcTextureBestCompressor: 4 m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref m_ProjectGenerationRootNamespace: m_EnableTextureStreamingInEditMode: 1 m_EnableTextureStreamingInPlayMode: 1 m_AsyncShaderCompilation: 1 m_CachingShaderPreprocessor: 0 m_EnterPlayModeOptionsEnabled: 0 m_EnterPlayModeOptions: 3 m_GameObjectNamingDigits: 1 m_GameObjectNamingScheme: 0 m_AssetNamingUsesSpace: 1 m_UseLegacyProbeSampleCount: 1 m_SerializeInlineMappingsOnOneLine: 0 m_DisableCookiesInLightmapper: 1 m_AssetPipelineMode: 1 m_CacheServerMode: 0 m_CacheServerEndpoint: m_CacheServerNamespacePrefix: default m_CacheServerEnableDownload: 1 m_CacheServerEnableUpload: 1 m_CacheServerEnableAuth: 0 m_CacheServerEnableTls: 0 Assets/Plugins/NativeWebSocket/ProjectSettings/EditorSettings.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 3096faf0a519a3345875c12aadc8f077 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/GraphicsSettings.asset
New file @@ -0,0 +1,64 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!30 &1 GraphicsSettings: m_ObjectHideFlags: 0 serializedVersion: 12 m_Deferred: m_Mode: 1 m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} m_DeferredReflections: m_Mode: 1 m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} m_ScreenSpaceShadows: m_Mode: 1 m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} m_LegacyDeferred: m_Mode: 1 m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} m_DepthNormals: m_Mode: 1 m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} m_MotionVectors: m_Mode: 1 m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} m_LightHalo: m_Mode: 1 m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} m_LensFlare: m_Mode: 1 m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} m_AlwaysIncludedShaders: - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_CustomRenderPipeline: {fileID: 0} m_TransparencySortMode: 0 m_TransparencySortAxis: {x: 0, y: 0, z: 1} m_DefaultRenderingPath: 1 m_DefaultMobileRenderingPath: 1 m_TierSettings: [] m_LightmapStripping: 0 m_FogStripping: 0 m_InstancingStripping: 0 m_LightmapKeepPlain: 1 m_LightmapKeepDirCombined: 1 m_LightmapKeepDynamicPlain: 1 m_LightmapKeepDynamicDirCombined: 1 m_LightmapKeepShadowMask: 1 m_LightmapKeepSubtractive: 1 m_FogKeepLinear: 1 m_FogKeepExp: 1 m_FogKeepExp2: 1 m_AlbedoSwatchInfos: [] m_LightsUseLinearIntensity: 0 m_LightsUseColorTemperature: 0 Assets/Plugins/NativeWebSocket/ProjectSettings/GraphicsSettings.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 9bb94c68e4b895944bc9fe8428e8d1a1 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/InputManager.asset
New file @@ -0,0 +1,295 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!13 &1 InputManager: m_ObjectHideFlags: 0 serializedVersion: 2 m_Axes: - serializedVersion: 3 m_Name: Horizontal descriptiveName: descriptiveNegativeName: negativeButton: left positiveButton: right altNegativeButton: a altPositiveButton: d gravity: 3 dead: 0.001 sensitivity: 3 snap: 1 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Vertical descriptiveName: descriptiveNegativeName: negativeButton: down positiveButton: up altNegativeButton: s altPositiveButton: w gravity: 3 dead: 0.001 sensitivity: 3 snap: 1 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire1 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: left ctrl altNegativeButton: altPositiveButton: mouse 0 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire2 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: left alt altNegativeButton: altPositiveButton: mouse 1 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire3 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: left shift altNegativeButton: altPositiveButton: mouse 2 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Jump descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: space altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Mouse X descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0 sensitivity: 0.1 snap: 0 invert: 0 type: 1 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Mouse Y descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0 sensitivity: 0.1 snap: 0 invert: 0 type: 1 axis: 1 joyNum: 0 - serializedVersion: 3 m_Name: Mouse ScrollWheel descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0 sensitivity: 0.1 snap: 0 invert: 0 type: 1 axis: 2 joyNum: 0 - serializedVersion: 3 m_Name: Horizontal descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 0 type: 2 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Vertical descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 1 type: 2 axis: 1 joyNum: 0 - serializedVersion: 3 m_Name: Fire1 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: joystick button 0 altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire2 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: joystick button 1 altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire3 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: joystick button 2 altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Jump descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: joystick button 3 altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Submit descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: return altNegativeButton: altPositiveButton: joystick button 0 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Submit descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: enter altNegativeButton: altPositiveButton: space gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Cancel descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: escape altNegativeButton: altPositiveButton: joystick button 1 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 Assets/Plugins/NativeWebSocket/ProjectSettings/InputManager.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 0ca235914a8dbb14b920c843bb371296 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/NavMeshAreas.asset
New file @@ -0,0 +1,93 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!126 &1 NavMeshProjectSettings: m_ObjectHideFlags: 0 serializedVersion: 2 areas: - name: Walkable cost: 1 - name: Not Walkable cost: 1 - name: Jump cost: 2 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 m_LastAgentTypeID: -887442657 m_Settings: - serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.75 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 maxJobWorkers: 0 preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_SettingNames: - Humanoid Assets/Plugins/NativeWebSocket/ProjectSettings/NavMeshAreas.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: f2a9df8bf6aa053489112541146ac1bf NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/Physics2DSettings.asset
New file @@ -0,0 +1,56 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!19 &1 Physics2DSettings: m_ObjectHideFlags: 0 serializedVersion: 4 m_Gravity: {x: 0, y: -9.81} m_DefaultMaterial: {fileID: 0} m_VelocityIterations: 8 m_PositionIterations: 3 m_VelocityThreshold: 1 m_MaxLinearCorrection: 0.2 m_MaxAngularCorrection: 8 m_MaxTranslationSpeed: 100 m_MaxRotationSpeed: 360 m_BaumgarteScale: 0.2 m_BaumgarteTimeOfImpactScale: 0.75 m_TimeToSleep: 0.5 m_LinearSleepTolerance: 0.01 m_AngularSleepTolerance: 2 m_DefaultContactOffset: 0.01 m_JobOptions: serializedVersion: 2 useMultithreading: 0 useConsistencySorting: 0 m_InterpolationPosesPerJob: 100 m_NewContactsPerJob: 30 m_CollideContactsPerJob: 100 m_ClearFlagsPerJob: 200 m_ClearBodyForcesPerJob: 200 m_SyncDiscreteFixturesPerJob: 50 m_SyncContinuousFixturesPerJob: 50 m_FindNearestContactsPerJob: 100 m_UpdateTriggerContactsPerJob: 100 m_IslandSolverCostThreshold: 100 m_IslandSolverBodyCostScale: 1 m_IslandSolverContactCostScale: 10 m_IslandSolverJointCostScale: 10 m_IslandSolverBodiesPerJob: 50 m_IslandSolverContactsPerJob: 50 m_AutoSimulation: 1 m_QueriesHitTriggers: 1 m_QueriesStartInColliders: 1 m_CallbacksOnDisable: 1 m_ReuseCollisionCallbacks: 1 m_AutoSyncTransforms: 0 m_AlwaysShowColliders: 0 m_ShowColliderSleep: 1 m_ShowColliderContacts: 0 m_ShowColliderAABB: 0 m_ContactArrowScale: 0.2 m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff Assets/Plugins/NativeWebSocket/ProjectSettings/Physics2DSettings.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 2933f84a479545d429e68f90428d316c NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/PresetManager.asset
New file @@ -0,0 +1,7 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!1386491679 &1 PresetManager: m_ObjectHideFlags: 0 serializedVersion: 2 m_DefaultPresets: {} Assets/Plugins/NativeWebSocket/ProjectSettings/PresetManager.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 587504546c55949429325bd519886328 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/ProjectSettings.asset
New file @@ -0,0 +1,650 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 serializedVersion: 18 productGUID: dc7225b1f8ee64a3abfd6eb883cd32ec AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 AndroidEnableSustainedPerformanceMode: 0 defaultScreenOrientation: 4 targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 companyName: gamestdio productName: UnityWebSockets defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} m_ShowUnitySplashScreen: 1 m_ShowUnitySplashLogo: 1 m_SplashScreenOverlayOpacity: 1 m_SplashScreenAnimation: 1 m_SplashScreenLogoStyle: 1 m_SplashScreenDrawMode: 0 m_SplashScreenBackgroundAnimationZoom: 1 m_SplashScreenLogoAnimationZoom: 1 m_SplashScreenBackgroundLandscapeAspect: 1 m_SplashScreenBackgroundPortraitAspect: 1 m_SplashScreenBackgroundLandscapeUvs: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 m_SplashScreenBackgroundPortraitUvs: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 m_SplashScreenLogos: [] m_VirtualRealitySplashScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0} defaultScreenWidth: 1024 defaultScreenHeight: 768 defaultScreenWidthWeb: 960 defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 m_MTRendering: 1 m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 displayResolutionDialog: 0 iosUseCustomAppBackgroundBehavior: 0 iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 allowedAutorotateToLandscapeRight: 1 allowedAutorotateToLandscapeLeft: 1 useOSAutorotation: 1 use32BitDisplayBuffer: 1 preserveFramebufferAlpha: 0 disableDepthAndStencilBuffers: 0 androidStartInFullscreen: 1 androidRenderOutsideSafeArea: 1 androidUseSwappy: 0 androidBlitType: 0 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 1 captureSingleScreen: 0 muteOtherAudioSources: 0 Prepare IOS For Recording: 0 Force IOS Speakers When Recording: 0 deferSystemGesturesMode: 0 hideHomeButton: 0 submitAnalytics: 1 usePlayerLog: 1 bakeCollisionMeshes: 0 forceSingleInstance: 0 useFlipModelSwapchain: 1 resizableWindow: 0 useMacAppStoreValidation: 0 macAppStoreCategory: public.app-category.games gpuSkinning: 1 graphicsJobs: 0 xboxPIXTextureCapture: 0 xboxEnableAvatar: 0 xboxEnableKinect: 0 xboxEnableKinectAutoTracking: 0 xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 graphicsJobMode: 0 fullscreenMode: 1 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 xboxEnablePIXSampling: 0 metalFramebufferOnly: 0 xboxOneResolution: 0 xboxOneSResolution: 0 xboxOneXResolution: 3 xboxOneMonoLoggingLevel: 0 xboxOneLoggingLevel: 1 xboxOneDisableEsram: 0 xboxOnePresentImmediateThreshold: 0 switchQueueCommandMemory: 0 switchQueueControlMemory: 16384 switchQueueComputeMemory: 262144 switchNVNShaderPoolsGranularity: 33554432 switchNVNDefaultPoolsGranularity: 16777216 switchNVNOtherPoolsGranularity: 16777216 vulkanEnableSetSRGBWrite: 0 m_SupportedAspectRatios: 4:3: 1 5:4: 1 16:10: 1 16:9: 1 Others: 1 bundleVersion: 1.0 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 xboxOneDisableKinectGpuReservation: 1 xboxOneEnable7thCore: 1 vrSettings: cardboard: depthFormat: 0 enableTransitionView: 0 daydream: depthFormat: 0 useSustainedPerformanceMode: 0 enableVideoLayer: 0 useProtectedVideoMemory: 0 minimumSupportedHeadTracking: 0 maximumSupportedHeadTracking: 1 hololens: depthFormat: 1 depthBufferSharingEnabled: 1 lumin: depthFormat: 0 frameTiming: 2 enableGLCache: 0 glCacheMaxBlobSize: 524288 glCacheMaxFileSize: 8388608 oculus: sharedDepthBuffer: 1 dashSupport: 1 lowOverheadMode: 0 enable360StereoCapture: 0 isWsaHolographicRemotingEnabled: 0 protectGraphicsMemory: 0 enableFrameTimingStats: 0 useHDRDisplay: 0 m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: {} buildNumber: {} AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 16 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: stripEngineCode: 1 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 ForceInternetPermission: 0 ForceSDCardPermission: 0 CreateWallpaper: 0 APKExpansionFiles: 0 keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 1 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 iOSTargetOSVersionString: 9.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 9.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 uIStatusBarHidden: 1 uIExitOnSuspend: 0 uIStatusBarStyle: 0 iPhoneSplashScreen: {fileID: 0} iPhoneHighResSplashScreen: {fileID: 0} iPhoneTallHighResSplashScreen: {fileID: 0} iPhone47inSplashScreen: {fileID: 0} iPhone55inPortraitSplashScreen: {fileID: 0} iPhone55inLandscapeSplashScreen: {fileID: 0} iPhone58inPortraitSplashScreen: {fileID: 0} iPhone58inLandscapeSplashScreen: {fileID: 0} iPadPortraitSplashScreen: {fileID: 0} iPadHighResPortraitSplashScreen: {fileID: 0} iPadLandscapeSplashScreen: {fileID: 0} iPadHighResLandscapeSplashScreen: {fileID: 0} iPhone65inPortraitSplashScreen: {fileID: 0} iPhone65inLandscapeSplashScreen: {fileID: 0} iPhone61inPortraitSplashScreen: {fileID: 0} iPhone61inLandscapeSplashScreen: {fileID: 0} appleTVSplashScreen: {fileID: 0} appleTVSplashScreen2x: {fileID: 0} tvOSSmallIconLayers: [] tvOSSmallIconLayers2x: [] tvOSLargeIconLayers: [] tvOSLargeIconLayers2x: [] tvOSTopShelfImageLayers: [] tvOSTopShelfImageLayers2x: [] tvOSTopShelfImageWideLayers: [] tvOSTopShelfImageWideLayers2x: [] iOSLaunchScreenType: 0 iOSLaunchScreenPortrait: {fileID: 0} iOSLaunchScreenLandscape: {fileID: 0} iOSLaunchScreenBackgroundColor: serializedVersion: 2 rgba: 0 iOSLaunchScreenFillPct: 100 iOSLaunchScreenSize: 100 iOSLaunchScreenCustomXibPath: iOSLaunchScreeniPadType: 0 iOSLaunchScreeniPadImage: {fileID: 0} iOSLaunchScreeniPadBackgroundColor: serializedVersion: 2 rgba: 0 iOSLaunchScreeniPadFillPct: 100 iOSLaunchScreeniPadSize: 100 iOSLaunchScreeniPadCustomXibPath: iOSUseLaunchScreenStoryboard: 0 iOSLaunchScreenCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] iOSBackgroundModes: 0 iOSMetalForceHardShadows: 0 metalEditorSupport: 1 metalAPIValidation: 1 iOSRenderExtraFrameOnPause: 0 appleDeveloperTeamID: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: iOSManualSigningProvisioningProfileType: 0 tvOSManualSigningProvisioningProfileType: 0 appleEnableAutomaticSigning: 0 iOSRequireARKit: 0 iOSAutomaticallyDetectAndAddCapabilities: 1 appleEnableProMotion: 0 clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea templatePackageId: com.unity.template.3d@3.1.0 templateDefaultScene: Assets/Scenes/SampleScene.unity AndroidTargetArchitectures: 1 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} AndroidKeystoreName: '{inproject}: ' AndroidKeyaliasName: AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 0 AndroidIsGame: 1 AndroidEnableTango: 0 androidEnableBanner: 1 androidUseLowAccuracyLocation: 0 androidUseCustomKeystore: 0 m_AndroidBanners: - width: 320 height: 180 banner: {fileID: 0} androidGamepadSupportLevel: 0 AndroidValidateAppBundleSize: 1 AndroidAppBundleSizeToValidate: 150 resolutionDialogBanner: {fileID: 0} m_BuildTargetIcons: [] m_BuildTargetPlatformIcons: [] m_BuildTargetBatching: - m_BuildTarget: Standalone m_StaticBatching: 1 m_DynamicBatching: 0 - m_BuildTarget: tvOS m_StaticBatching: 1 m_DynamicBatching: 0 - m_BuildTarget: Android m_StaticBatching: 1 m_DynamicBatching: 0 - m_BuildTarget: iPhone m_StaticBatching: 1 m_DynamicBatching: 0 - m_BuildTarget: WebGL m_StaticBatching: 0 m_DynamicBatching: 0 m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer m_APIs: 150000000b000000 m_Automatic: 0 - m_BuildTarget: iOSSupport m_APIs: 10000000 m_Automatic: 1 - m_BuildTarget: AppleTVSupport m_APIs: 10000000 m_Automatic: 0 - m_BuildTarget: WebGLSupport m_APIs: 0b000000 m_Automatic: 1 m_BuildTargetVRSettings: - m_BuildTarget: Standalone m_Enabled: 0 m_Devices: - Oculus - OpenVR openGLRequireES31: 0 openGLRequireES31AEP: 0 openGLRequireES32: 0 vuforiaEnabled: 0 m_TemplateCustomTags: {} mobileMTRendering: Android: 1 iPhone: 1 tvOS: 1 m_BuildTargetGroupLightmapEncodingQuality: [] m_BuildTargetGroupLightmapSettings: [] playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 enableInternalProfiler: 0 logObjCUncaughtExceptions: 1 enableCrashReportAPI: 0 cameraUsageDescription: locationUsageDescription: microphoneUsageDescription: switchNetLibKey: switchSocketMemoryPoolSize: 6144 switchSocketAllocatorPoolSize: 128 switchSocketConcurrencyLimit: 14 switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: switchTitleNames_0: switchTitleNames_1: switchTitleNames_2: switchTitleNames_3: switchTitleNames_4: switchTitleNames_5: switchTitleNames_6: switchTitleNames_7: switchTitleNames_8: switchTitleNames_9: switchTitleNames_10: switchTitleNames_11: switchTitleNames_12: switchTitleNames_13: switchTitleNames_14: switchPublisherNames_0: switchPublisherNames_1: switchPublisherNames_2: switchPublisherNames_3: switchPublisherNames_4: switchPublisherNames_5: switchPublisherNames_6: switchPublisherNames_7: switchPublisherNames_8: switchPublisherNames_9: switchPublisherNames_10: switchPublisherNames_11: switchPublisherNames_12: switchPublisherNames_13: switchPublisherNames_14: switchIcons_0: {fileID: 0} switchIcons_1: {fileID: 0} switchIcons_2: {fileID: 0} switchIcons_3: {fileID: 0} switchIcons_4: {fileID: 0} switchIcons_5: {fileID: 0} switchIcons_6: {fileID: 0} switchIcons_7: {fileID: 0} switchIcons_8: {fileID: 0} switchIcons_9: {fileID: 0} switchIcons_10: {fileID: 0} switchIcons_11: {fileID: 0} switchIcons_12: {fileID: 0} switchIcons_13: {fileID: 0} switchIcons_14: {fileID: 0} switchSmallIcons_0: {fileID: 0} switchSmallIcons_1: {fileID: 0} switchSmallIcons_2: {fileID: 0} switchSmallIcons_3: {fileID: 0} switchSmallIcons_4: {fileID: 0} switchSmallIcons_5: {fileID: 0} switchSmallIcons_6: {fileID: 0} switchSmallIcons_7: {fileID: 0} switchSmallIcons_8: {fileID: 0} switchSmallIcons_9: {fileID: 0} switchSmallIcons_10: {fileID: 0} switchSmallIcons_11: {fileID: 0} switchSmallIcons_12: {fileID: 0} switchSmallIcons_13: {fileID: 0} switchSmallIcons_14: {fileID: 0} switchManualHTML: switchAccessibleURLs: switchLegalInformation: switchMainThreadStackSize: 1048576 switchPresenceGroupId: switchLogoHandling: 0 switchReleaseVersion: 0 switchDisplayVersion: 1.0.0 switchStartupUserAccount: 0 switchTouchScreenUsage: 0 switchSupportedLanguagesMask: 0 switchLogoType: 0 switchApplicationErrorCodeCategory: switchUserAccountSaveDataSize: 0 switchUserAccountSaveDataJournalSize: 0 switchApplicationAttribute: 0 switchCardSpecSize: -1 switchCardSpecClock: -1 switchRatingsMask: 0 switchRatingsInt_0: 0 switchRatingsInt_1: 0 switchRatingsInt_2: 0 switchRatingsInt_3: 0 switchRatingsInt_4: 0 switchRatingsInt_5: 0 switchRatingsInt_6: 0 switchRatingsInt_7: 0 switchRatingsInt_8: 0 switchRatingsInt_9: 0 switchRatingsInt_10: 0 switchRatingsInt_11: 0 switchLocalCommunicationIds_0: switchLocalCommunicationIds_1: switchLocalCommunicationIds_2: switchLocalCommunicationIds_3: switchLocalCommunicationIds_4: switchLocalCommunicationIds_5: switchLocalCommunicationIds_6: switchLocalCommunicationIds_7: switchParentalControl: 0 switchAllowsScreenshot: 1 switchAllowsVideoCapturing: 1 switchAllowsRuntimeAddOnContentInstall: 0 switchDataLossConfirmation: 0 switchUserAccountLockEnabled: 0 switchSystemResourceMemory: 16777216 switchSupportedNpadStyles: 3 switchNativeFsCacheSize: 32 switchIsHoldTypeHorizontal: 0 switchSupportedNpadCount: 8 switchSocketConfigEnabled: 0 switchTcpInitialSendBufferSize: 32 switchTcpInitialReceiveBufferSize: 64 switchTcpAutoSendBufferSizeMax: 256 switchTcpAutoReceiveBufferSizeMax: 256 switchUdpSendBufferSize: 9 switchUdpReceiveBufferSize: 42 switchSocketBufferEfficiency: 4 switchSocketInitializeEnabled: 1 switchNetworkInterfaceManagerInitializeEnabled: 1 switchPlayerConnectionEnabled: 1 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: ps4ParentalLevel: 11 ps4ContentID: ED1633-NPXX51362_00-0000000000000000 ps4Category: 0 ps4MasterVersion: 01.00 ps4AppVersion: 01.00 ps4AppType: 0 ps4ParamSfxPath: ps4VideoOutPixelFormat: 0 ps4VideoOutInitialWidth: 1920 ps4VideoOutBaseModeInitialWidth: 1920 ps4VideoOutReprojectionRate: 60 ps4PronunciationXMLPath: ps4PronunciationSIGPath: ps4BackgroundImagePath: ps4StartupImagePath: ps4StartupImagesFolder: ps4IconImagesFolder: ps4SaveDataImagePath: ps4SdkOverride: ps4BGMPath: ps4ShareFilePath: ps4ShareOverlayImagePath: ps4PrivacyGuardImagePath: ps4NPtitleDatPath: ps4RemotePlayKeyAssignment: -1 ps4RemotePlayKeyMappingDir: ps4PlayTogetherPlayerCount: 0 ps4EnterButtonAssignment: 1 ps4ApplicationParam1: 0 ps4ApplicationParam2: 0 ps4ApplicationParam3: 0 ps4ApplicationParam4: 0 ps4DownloadDataSize: 0 ps4GarlicHeapSize: 2048 ps4ProGarlicHeapSize: 2560 playerPrefsMaxSize: 32768 ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ ps4pnSessions: 1 ps4pnPresence: 1 ps4pnFriends: 1 ps4pnGameCustomData: 1 playerPrefsSupport: 0 enableApplicationExit: 0 resetTempFolder: 1 restrictedAudioUsageRights: 0 ps4UseResolutionFallback: 0 ps4ReprojectionSupport: 0 ps4UseAudio3dBackend: 0 ps4SocialScreenEnabled: 0 ps4ScriptOptimizationLevel: 0 ps4Audio3dVirtualSpeakerCount: 14 ps4attribCpuUsage: 0 ps4PatchPkgPath: ps4PatchLatestPkgPath: ps4PatchChangeinfoPath: ps4PatchDayOne: 0 ps4attribUserManagement: 0 ps4attribMoveSupport: 0 ps4attrib3DSupport: 0 ps4attribShareSupport: 0 ps4attribExclusiveVR: 0 ps4disableAutoHideSplash: 0 ps4videoRecordingFeaturesUsed: 0 ps4contentSearchFeaturesUsed: 0 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] monoEnv: splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} blurSplashScreenBackground: 1 spritePackerPolicy: webGLMemorySize: 16 webGLExceptionSupport: 1 webGLNameFilesAsHashes: 0 webGLDataCaching: 1 webGLDebugSymbols: 0 webGLEmscriptenArgs: webGLModulesDirectory: webGLTemplate: APPLICATION:Default webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 webGLCompressionFormat: 1 webGLLinkerTarget: 1 webGLThreadsSupport: 0 webGLWasmStreaming: 0 scriptingDefineSymbols: {} platformArchitecture: {} scriptingBackend: {} il2cppCompilerConfiguration: {} managedStrippingLevel: {} incrementalIl2cppBuild: {} allowUnsafeCode: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 0 gcWBarrierValidation: 0 apiCompatibilityLevelPerPlatform: WebGL: 3 m_RenderingPath: 1 m_MobileRenderingPath: 1 metroPackageName: Template_3D metroPackageVersion: metroCertificatePath: metroCertificatePassword: metroCertificateSubject: metroCertificateIssuer: metroCertificateNotAfter: 0000000000000000 metroApplicationDescription: Template_3D wsaImages: {} metroTileShortName: metroTileShowName: 0 metroMediumTileShowName: 0 metroLargeTileShowName: 0 metroWideTileShowName: 0 metroSupportStreamingInstall: 0 metroLastRequiredScene: 0 metroDefaultTileSize: 1 metroTileForegroundText: 2 metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} metroSplashScreenUseBackgroundColor: 0 platformCapabilities: {} metroTargetDeviceFamilies: {} metroFTAName: metroFTAFileTypes: [] metroProtocolName: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: XboxOneContentId: XboxOneTitleId: XboxOneSCId: XboxOneGameOsOverridePath: XboxOnePackagingOverridePath: XboxOneAppManifestOverridePath: XboxOneVersion: 1.0.0.0 XboxOnePackageEncryption: 0 XboxOnePackageUpdateGranularity: 2 XboxOneDescription: XboxOneLanguage: - enus XboxOneCapability: [] XboxOneGameRating: {} XboxOneIsContentPackage: 0 XboxOneEnableGPUVariability: 1 XboxOneSockets: {} XboxOneSplashScreen: {fileID: 0} XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 XboxOneXTitleMemory: 8 xboxOneScriptCompiler: 1 XboxOneOverrideIdentityName: vrEditorSettings: daydream: daydreamIconForeground: {fileID: 0} daydreamIconBackground: {fileID: 0} cloudServicesEnabled: UNet: 1 luminIcon: m_Name: m_ModelFolderPath: m_PortalFolderPath: luminCert: m_CertPath: m_SignPackage: 1 luminIsChannelApp: 0 luminVersion: m_VersionCode: 1 m_VersionName: facebookSdkVersion: 7.9.4 facebookAppId: facebookCookies: 1 facebookLogging: 1 facebookStatus: 1 facebookXfbml: 0 facebookFrictionlessRequests: 1 apiCompatibilityLevel: 6 cloudProjectId: framebufferDepthMemorylessMode: 0 projectName: organizationId: cloudEnabled: 0 enableNativePlatformBackendsForNewInputSystem: 0 disableOldInputManagerSupport: 0 legacyClampBlendShapeWeights: 1 Assets/Plugins/NativeWebSocket/ProjectSettings/ProjectSettings.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 8bd50fb94969aa94c9a58c288c070435 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/ProjectVersion.txt
New file @@ -0,0 +1,2 @@ m_EditorVersion: 2021.2.11f1 m_EditorVersionWithRevision: 2021.2.11f1 (e50cafbb4399) Assets/Plugins/NativeWebSocket/ProjectSettings/ProjectVersion.txt.meta
New file @@ -0,0 +1,7 @@ fileFormatVersion: 2 guid: f2a0576cb777bc1428b06cf00043d4ee TextScriptImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/QualitySettings.asset
New file @@ -0,0 +1,231 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!47 &1 QualitySettings: m_ObjectHideFlags: 0 serializedVersion: 5 m_CurrentQuality: 5 m_QualitySettings: - serializedVersion: 2 name: Very Low pixelLightCount: 0 shadows: 0 shadowResolution: 0 shadowProjection: 1 shadowCascades: 1 shadowDistance: 15 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 blendWeights: 1 textureQuality: 1 anisotropicTextures: 0 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 0 lodBias: 0.3 maximumLODLevel: 0 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 streamingMipmapsRenderersPerFrame: 512 streamingMipmapsMaxLevelReduction: 2 streamingMipmapsMaxFileIORequests: 1024 particleRaycastBudget: 4 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: Low pixelLightCount: 0 shadows: 0 shadowResolution: 0 shadowProjection: 1 shadowCascades: 1 shadowDistance: 20 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 blendWeights: 2 textureQuality: 0 anisotropicTextures: 0 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 0 lodBias: 0.4 maximumLODLevel: 0 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 streamingMipmapsRenderersPerFrame: 512 streamingMipmapsMaxLevelReduction: 2 streamingMipmapsMaxFileIORequests: 1024 particleRaycastBudget: 16 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: Medium pixelLightCount: 1 shadows: 1 shadowResolution: 0 shadowProjection: 1 shadowCascades: 1 shadowDistance: 20 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 blendWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 1 lodBias: 0.7 maximumLODLevel: 0 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 streamingMipmapsRenderersPerFrame: 512 streamingMipmapsMaxLevelReduction: 2 streamingMipmapsMaxFileIORequests: 1024 particleRaycastBudget: 64 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: High pixelLightCount: 2 shadows: 2 shadowResolution: 1 shadowProjection: 1 shadowCascades: 2 shadowDistance: 40 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 blendWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 lodBias: 1 maximumLODLevel: 0 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 streamingMipmapsRenderersPerFrame: 512 streamingMipmapsMaxLevelReduction: 2 streamingMipmapsMaxFileIORequests: 1024 particleRaycastBudget: 256 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: Very High pixelLightCount: 3 shadows: 2 shadowResolution: 2 shadowProjection: 1 shadowCascades: 2 shadowDistance: 70 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 blendWeights: 4 textureQuality: 0 anisotropicTextures: 2 antiAliasing: 2 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 lodBias: 1.5 maximumLODLevel: 0 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 streamingMipmapsRenderersPerFrame: 512 streamingMipmapsMaxLevelReduction: 2 streamingMipmapsMaxFileIORequests: 1024 particleRaycastBudget: 1024 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: Ultra pixelLightCount: 4 shadows: 2 shadowResolution: 2 shadowProjection: 1 shadowCascades: 4 shadowDistance: 150 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 blendWeights: 4 textureQuality: 0 anisotropicTextures: 2 antiAliasing: 2 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 lodBias: 2 maximumLODLevel: 0 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 streamingMipmapsRenderersPerFrame: 512 streamingMipmapsMaxLevelReduction: 2 streamingMipmapsMaxFileIORequests: 1024 particleRaycastBudget: 4096 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] m_PerPlatformDefaultQuality: Android: 2 Lumin: 5 Nintendo 3DS: 5 Nintendo Switch: 5 PS4: 5 PSP2: 2 Standalone: 5 WebGL: 3 Windows Store Apps: 5 XboxOne: 5 iPhone: 2 tvOS: 2 Assets/Plugins/NativeWebSocket/ProjectSettings/QualitySettings.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 51bd3c4d5cea99845a4bf4f903dd4b53 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/TagManager.asset
New file @@ -0,0 +1,43 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!78 &1 TagManager: serializedVersion: 2 tags: [] layers: - Default - TransparentFX - Ignore Raycast - - Water - UI - - - - - - - - - - - - - - - - - - - - - - - - - - m_SortingLayers: - name: Default uniqueID: 0 locked: 0 Assets/Plugins/NativeWebSocket/ProjectSettings/TagManager.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: cd49a79746fbe5e47b55beb4f03300e0 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/TimeManager.asset
New file @@ -0,0 +1,9 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!5 &1 TimeManager: m_ObjectHideFlags: 0 Fixed Timestep: 0.02 Maximum Allowed Timestep: 0.33333334 m_TimeScale: 1 Maximum Particle Timestep: 0.03 Assets/Plugins/NativeWebSocket/ProjectSettings/TimeManager.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: e950e432b22387a45b29489d09c5be59 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/UnityConnectSettings.asset
New file @@ -0,0 +1,34 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!310 &1 UnityConnectSettings: m_ObjectHideFlags: 0 serializedVersion: 1 m_Enabled: 0 m_TestMode: 0 m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events m_EventUrl: https://cdp.cloud.unity3d.com/v1/events m_ConfigUrl: https://config.uca.cloud.unity3d.com m_TestInitMode: 0 CrashReportingSettings: m_EventUrl: https://perf-events.cloud.unity3d.com m_Enabled: 0 m_LogBufferSize: 10 m_CaptureEditorExceptions: 1 UnityPurchasingSettings: m_Enabled: 0 m_TestMode: 0 UnityAnalyticsSettings: m_Enabled: 0 m_TestMode: 0 m_InitializeOnStartup: 1 UnityAdsSettings: m_Enabled: 0 m_InitializeOnStartup: 1 m_TestMode: 0 m_IosGameId: m_AndroidGameId: m_GameIds: {} m_GameId: PerformanceReportingSettings: m_Enabled: 0 Assets/Plugins/NativeWebSocket/ProjectSettings/UnityConnectSettings.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 0193b4020a3545a45ab65e41135e1031 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/VFXManager.asset
New file @@ -0,0 +1,14 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!937362698 &1 VFXManager: m_ObjectHideFlags: 0 m_IndirectShader: {fileID: 0} m_CopyBufferShader: {fileID: 0} m_SortShader: {fileID: 0} m_StripUpdateShader: {fileID: 0} m_RenderPipeSettingsPath: m_FixedTimeStep: 0.016666668 m_MaxDeltaTime: 0.05 m_CompiledVersion: 0 m_RuntimeVersion: 0 Assets/Plugins/NativeWebSocket/ProjectSettings/VFXManager.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: 6696b4558f9342f4681d9384b68f1c03 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: Assets/Plugins/NativeWebSocket/ProjectSettings/XRSettings.asset
New file @@ -0,0 +1,10 @@ { "m_SettingKeys": [ "VR Device Disabled", "VR Device User Alert" ], "m_SettingValues": [ "False", "False" ] } Assets/Plugins/NativeWebSocket/ProjectSettings/XRSettings.asset.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: f4eafe2cae4c1e74fb799af05dc18de4 NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: