fixed wave counter's lack of font

This commit is contained in:
msk
2022-01-30 14:41:03 -08:00
parent d4c5e84404
commit 640245cdd5
5 changed files with 32 additions and 16 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
PackageName: TNH_Quality_of_Life_Improvements
Author: muskit
Version: 1.1.0
Version: 1.1.1
Icon: {fileID: 2800000, guid: 785b7946398f5314b95bf593d2d77d67, type: 3}
ReadMe: {fileID: 102900000, guid: ab1d6dea017447a48ac348db588a6f35, type: 3}
WebsiteURL: https://github.com/muskit/TNH-Quality-of-Life-Improvements
+10 -2
View File
@@ -88,9 +88,16 @@ public class MeatKitPlugin : BaseUnityPlugin
HPReadability.ImproveHPTextReadability(healthCounter.transform.GetChild(0).gameObject);
}
// grab Agency FB from game if it's not set
if(fontAgencyFB == null)
GetFonts();
}
// called on scene change, find fonts from game if they're not set
private void GetFonts()
{
// Agency FB
if (fontAgencyFB == null)
{
var healthCounter = FindObjectOfType<FistVR.FVRHealthBar>();
if (healthCounter != null)
{
fontAgencyFB = healthCounter.transform.GetChild(0).GetChild(0).GetComponent<Text>().font;
@@ -108,6 +115,7 @@ public class MeatKitPlugin : BaseUnityPlugin
}
}
}
}
public MeatKitPlugin(): base()