silly error

This commit is contained in:
Noah Pilarski 2024-01-01 23:59:41 -05:00
parent aedeb80f16
commit 375a18e401

View File

@ -949,7 +949,13 @@ namespace NewHorizons.Handlers
{ {
flag = false; flag = false;
// idk why we wait here but we do // idk why we wait here but we do
Delay.FireInNUpdates(() => childObj.gameObject.SetActive(false), 2); Delay.FireInNUpdates(() =>
{
if (childObj != null && childObj.gameObject != null)
{
childObj.gameObject.SetActive(false);
}
}, 2);
} }
if (flag) NHLogger.LogWarning($"Couldn't find \"{childPath}\"."); if (flag) NHLogger.LogWarning($"Couldn't find \"{childPath}\".");