From b9befdc42b8e77907c7c647603cf513269195aac Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Fri, 12 Jul 2024 11:36:31 -0400 Subject: [PATCH] com.virtualmaker.rpc 1.0.0-preview.2 (#2) - Added UnityRpcTransportNone - Made UnityRpcTransportWebsocket public - Made UnityRpcTransportWebGL public --------- Co-authored-by: Alon Farchy <34091646+afarchy@users.noreply.github.com> Co-authored-by: Alon Farchy --- README.md | 2 +- .../Runtime/UnityRpcTransportNone.cs | 20 +++++++++++++++++++ .../Runtime/UnityRpcTransportNone.cs.meta | 11 ++++++++++ .../Runtime/UnityRpcTransportWebGL.cs | 2 +- .../Runtime/UnityRpcTransportWebsocket.cs | 2 +- 5 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportNone.cs create mode 100644 VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportNone.cs.meta diff --git a/README.md b/README.md index a2181ea..6bf725b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The recommended installation method is though the unity package manager and [Ope - Open your Unity project settings - Select the `Package Manager` -![scoped-registries](images/package-manager-scopes.png) +![scoped-registries](VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Documentation~/images/package-manager-scopes.png) - Add the OpenUPM package registry: - Name: `OpenUPM` - URL: `https://package.openupm.com` diff --git a/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportNone.cs b/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportNone.cs new file mode 100644 index 0000000..0134012 --- /dev/null +++ b/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportNone.cs @@ -0,0 +1,20 @@ +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System.Collections.Concurrent; +using UnityEngine; + +namespace VirtualMaker.RPC +{ + public class UnityRpcTransportNone : IUnityRpcTransport + { + public ConcurrentQueue ReceiveQueue { get; } = new(); + + public void SendMessage(string message) + { + } + + private void OnMessageInstance(string message) + { + } + } +} diff --git a/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportNone.cs.meta b/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportNone.cs.meta new file mode 100644 index 0000000..cce4e7c --- /dev/null +++ b/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportNone.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dfa6cc767c56ccb45abcedea0e92771a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportWebGL.cs b/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportWebGL.cs index b8943ea..e7f1934 100644 --- a/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportWebGL.cs +++ b/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportWebGL.cs @@ -9,7 +9,7 @@ namespace VirtualMaker.RPC { - internal class UnityRpcTransportWebGL : IUnityRpcTransport + public class UnityRpcTransportWebGL : IUnityRpcTransport { private static UnityRpcTransportWebGL _instance; diff --git a/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportWebsocket.cs b/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportWebsocket.cs index 4feac82..819dbb0 100644 --- a/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportWebsocket.cs +++ b/VirtualMaker.RPC/Packages/com.virtualmaker.rpc/Runtime/UnityRpcTransportWebsocket.cs @@ -5,7 +5,7 @@ namespace VirtualMaker.RPC { - internal class UnityRpcTransportWebsocket : IUnityRpcTransport + public class UnityRpcTransportWebsocket : IUnityRpcTransport { public ConcurrentQueue ReceiveQueue { get; } = new();