From 75f2aef0a5665cf711daa0b13bf71ed27ded080b Mon Sep 17 00:00:00 2001 From: Huw Dawson Date: Fri, 8 May 2020 15:56:08 +0100 Subject: [PATCH] Some fixes due to the project being broken. --- .gitignore | 4 +++- ChatController.cs | 6 +++--- UdonKeyboard/InWorldImmobilizeToggle.cs | 2 -- UdonKeyboard/KeyboardManager.cs | 2 +- UdonStringEvent/EventHandler.cs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 0a34381..f4e15f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -.vs \ No newline at end of file +*.prefab +*.asset +*.meta diff --git a/ChatController.cs b/ChatController.cs index a309edb..4499ea2 100644 --- a/ChatController.cs +++ b/ChatController.cs @@ -10,8 +10,8 @@ public class ChatController : UdonSharpBehaviour { ///The text input field for this controller. public InputField input; - ///The manager we want to handle chat events. - public EventEmissionManager manager; + ///The receiver we want to handle chat events. + public EventReceiver receiver; public string[] badWords; private int maxMessageLength; @@ -37,7 +37,7 @@ public void SendMessage() string message = input.text; if (badWordsFound(message) == false) { - manager.SendEvent("ChatMessage", message.Replace(",", "|")); + receiver.SendEvent("ChatMessage", message.Replace(",", "|")); } input.text = null; diff --git a/UdonKeyboard/InWorldImmobilizeToggle.cs b/UdonKeyboard/InWorldImmobilizeToggle.cs index c73b382..3e63c8f 100644 --- a/UdonKeyboard/InWorldImmobilizeToggle.cs +++ b/UdonKeyboard/InWorldImmobilizeToggle.cs @@ -23,7 +23,6 @@ public void PressKey() } Networking.LocalPlayer.Immobilize(true); - keyEventListener.Freeze(); buttonImage.color = Color.blue; toggle = true; } @@ -37,7 +36,6 @@ public void Deactivate() } buttonImage.color = Color.white; - keyEventListener.Unfreeze(); toggle = false; } } \ No newline at end of file diff --git a/UdonKeyboard/KeyboardManager.cs b/UdonKeyboard/KeyboardManager.cs index 2c736e5..b1815cf 100644 --- a/UdonKeyboard/KeyboardManager.cs +++ b/UdonKeyboard/KeyboardManager.cs @@ -125,7 +125,7 @@ public void Toggle() if (Networking.LocalPlayer != null && !Networking.LocalPlayer.IsUserInVR()) { - logger.Toggle(); + logScreen.Toggle(); } gameObject.SetActive(!gameObject.activeSelf); diff --git a/UdonStringEvent/EventHandler.cs b/UdonStringEvent/EventHandler.cs index 9d5e7f8..b0d9045 100644 --- a/UdonStringEvent/EventHandler.cs +++ b/UdonStringEvent/EventHandler.cs @@ -18,7 +18,7 @@ public class EventHandler : UdonSharpBehaviour public void Handle() { string[] e = newEvent.Split(','); - Debug.Log("Got an event named " + e[0] + " with payload " + newEvent + " - am owner? " + ownerOfGame); + Debug.Log("Got an event named " + e[0] + " with payload " + newEvent); // Event type switch. Contains both state and view events. (Too many synced strings currently will break eventually.) // TODO: Replace with a true event bus when network event payloads are added.