// Event received through a SendMessage("SendSharedVREvent") public void SendSharedVREvent() { if (MiddleVR.VRClusterMgr.IsServer() && m_EventButton != null) { m_EventButton.SetPressedState(0, true); } }
// Update is called once per frame public void Update() { if (m_ShareEventScript != null) { if (m_EventButton == null && MiddleVR.VRDeviceMgr != null) { m_EventButton = MiddleVR.VRDeviceMgr.GetButtons(m_ShareEventScript.ShareName); MiddleVRTools.Log("[+] Acquired shared event button " + m_EventButton.GetName()); } else if (m_EventButton != null) { if (m_EventButton.IsPressed(0)) { // Every node receive the event VRCallbackName // this.SendMessage("FinalFunction"); m_EventButton.SetPressedState(0, false); } } } }