From 93ce54b092512615ffa86c6230a056e6198b6723 Mon Sep 17 00:00:00 2001 From: denpadokei Date: Mon, 26 Jun 2023 23:28:34 +0900 Subject: [PATCH] wait --- Models/VRPointerHelper.cs | 8 ++++++++ manifest.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Models/VRPointerHelper.cs b/Models/VRPointerHelper.cs index ea9d8a4..3c25751 100644 --- a/Models/VRPointerHelper.cs +++ b/Models/VRPointerHelper.cs @@ -1,6 +1,7 @@ using HarmonyLib; using SiraUtil.Affinity; using System; +using System.Collections; using UnityEngine; using VRUIControls; @@ -13,6 +14,13 @@ public class VRPointerHelper : MonoBehaviour protected void OnEnable() { + this.StartCoroutine(this.InvokeEvent()); + } + + private IEnumerator InvokeEvent() + { + var waitInit = new WaitWhile(() => !this); + yield return waitInit; var vrpointer = this.GetComponent(); if (vrpointer != null) { OnPointerEnable.Invoke(vrpointer, EventArgs.Empty); diff --git a/manifest.json b/manifest.json index f313da0..2c72324 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "EnhancedStreamChat", "name": "Enhanced Stream Chat", "author": "denpadokei", - "version": "6.0.0-rc1", + "version": "6.0.0-rc2", "description": "Enhanced Stream Chat is a rich text chat integration mod, with full unicode, emote, and emoji support.", "gameVersion": "1.30.2", "dependsOn": {