From f1d7eeab0856a3fac0173f3382f1bc41068987a4 Mon Sep 17 00:00:00 2001 From: ChanyaKushima <63221603+ChanyaVRC@users.noreply.github.com> Date: Sun, 4 Dec 2022 13:09:18 +0900 Subject: [PATCH 1/2] Fixed the issue addresses for chatbox are changeable. --- src/VRCOscLib/VRCOscLib/Chatbox/OscChatbox.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/VRCOscLib/VRCOscLib/Chatbox/OscChatbox.cs b/src/VRCOscLib/VRCOscLib/Chatbox/OscChatbox.cs index 05db6e9..921885f 100644 --- a/src/VRCOscLib/VRCOscLib/Chatbox/OscChatbox.cs +++ b/src/VRCOscLib/VRCOscLib/Chatbox/OscChatbox.cs @@ -5,8 +5,9 @@ namespace BuildSoft.VRChat.Osc.Chatbox; public static class OscChatbox { - public static string InputAddress = "/chatbox/input"; - public static string TypingAddress = "/chatbox/typing"; + public static readonly string InputAddress = "/chatbox/input"; + public static readonly string TypingAddress = "/chatbox/typing"; + public static void SendMessage(string message, bool direct, bool complete = false) { OscClient client = OscUtility.Client; From 4abc2a3010a17fb96917c7760c06a3c45324e9c3 Mon Sep 17 00:00:00 2001 From: ChanyaKushima <63221603+ChanyaVRC@users.noreply.github.com> Date: Fri, 9 Dec 2022 21:36:22 +0900 Subject: [PATCH 2/2] Fixed resources lack. --- .../Tests/vrcosclib.Test/Avatar/OscPhysBoneTests.cs | 5 ++--- .../Tests/vrcosclib.Test/Chatbox/OscChatboxTest.cs | 8 +++----- .../vrcosclib.Test/Utility/OscParameterTests.cs | 12 +++++------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/VRCOscLib/Tests/vrcosclib.Test/Avatar/OscPhysBoneTests.cs b/src/VRCOscLib/Tests/vrcosclib.Test/Avatar/OscPhysBoneTests.cs index b6ea756..8da0b4e 100644 --- a/src/VRCOscLib/Tests/vrcosclib.Test/Avatar/OscPhysBoneTests.cs +++ b/src/VRCOscLib/Tests/vrcosclib.Test/Avatar/OscPhysBoneTests.cs @@ -21,7 +21,6 @@ public void Setup() TestUtility.CreateConfigFileForTest(AvatarId, "Test Avatar", TestUtility.GetAvatarConfigDirectory()); _avatar = OscAvatarConfig.Create(AvatarId)!; - _server = new OscServer(OscUtility.SendPort); OscParameter.Parameters.Clear(); } @@ -30,18 +29,18 @@ public void Setup() public void TearDown() { TestUtility.RestoreOscDirectory(); - _server.Dispose(); } [OneTimeSetUp] public void OneTimeSetUp() { + _server = new OscServer(OscUtility.SendPort); } [OneTimeTearDown] public void OneTimeTearDown() { - + _server.Dispose(); } [Test] diff --git a/src/VRCOscLib/Tests/vrcosclib.Test/Chatbox/OscChatboxTest.cs b/src/VRCOscLib/Tests/vrcosclib.Test/Chatbox/OscChatboxTest.cs index 42ba90c..f6e8c37 100644 --- a/src/VRCOscLib/Tests/vrcosclib.Test/Chatbox/OscChatboxTest.cs +++ b/src/VRCOscLib/Tests/vrcosclib.Test/Chatbox/OscChatboxTest.cs @@ -13,27 +13,25 @@ public class OscChatboxTest [SetUp] public void Setup() { - _server = new OscServer(OscUtility.SendPort); - OscParameter.Parameters.Clear(); } [TearDown] public void TearDown() { - _server.Dispose(); + } [OneTimeSetUp] public void OneTimeSetUp() { - + _server = new OscServer(OscUtility.SendPort); } [OneTimeTearDown] public void OneTimeTearDown() { - + _server.Dispose(); } diff --git a/src/VRCOscLib/Tests/vrcosclib.Test/Utility/OscParameterTests.cs b/src/VRCOscLib/Tests/vrcosclib.Test/Utility/OscParameterTests.cs index 909bae9..0beb5cb 100644 --- a/src/VRCOscLib/Tests/vrcosclib.Test/Utility/OscParameterTests.cs +++ b/src/VRCOscLib/Tests/vrcosclib.Test/Utility/OscParameterTests.cs @@ -19,29 +19,27 @@ public class OscParameterTests [SetUp] public void Setup() { - _client = new OscClient("127.0.0.1", OscUtility.ReceivePort); - _server = new OscServer(OscUtility.SendPort); - OscParameter.Parameters.Clear(); } [TearDown] public void TearDown() { - _client.Dispose(); - _server.Dispose(); + } [OneTimeSetUp] public void OneTimeSetUp() { - + _client = new OscClient(OscUtility.VrcIPAddress, OscUtility.ReceivePort); + _server = new OscServer(OscUtility.SendPort); } [OneTimeTearDown] public void OneTimeTearDown() { - + _client.Dispose(); + _server.Dispose(); } [Test]