fix in-play stuff not working in other maps

This commit is contained in:
msk
2022-01-24 03:40:08 -08:00
parent b259424300
commit 6f938e95c8
4 changed files with 40 additions and 10 deletions
+4 -3
View File
@@ -1,7 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using FistVR;
namespace TNHQoLImprovements
{
@@ -9,7 +9,8 @@ namespace TNHQoLImprovements
{
void Start()
{
transform.parent = GameObject.Find("_NewTAHReticle/TAHReticle_HealthBar").transform;
//transform.parent = GameObject.Find("_NewTAHReticle/TAHReticle_HealthBar").transform;
transform.parent = FindObjectOfType<TAH_Reticle>().transform.GetChild(3);
transform.localPosition = new Vector3(1, 0, -.5f);
transform.localRotation = Quaternion.Euler(90, 0, 0);
transform.localScale = new Vector3(0.002f, 0.002f, 0.002f);
@@ -31,7 +32,7 @@ namespace TNHQoLImprovements
else
{
debug_iterations++;
yield return new WaitForSeconds(0.25f);
yield return new WaitForEndOfFrame();
}
}
Debug.Log("Token sprite found after " + debug_iterations.ToString() + " iterations.");