PUN tutorial: Value = Health ERROR
Options
Just finished the tutorial from photonengine.com, but my game is throwing an error when PlayerUI calls:
After debugging, the specific issue is a missing reference to target.health.
Furthermore, the plot thickens; Sometimes when I reset Unity, I will get another error, " Failed to load My Robot Kyle, make sure it's in a Recources folder". (But IT IS in a resource folder).
Resetting Unity fixes this, but then I'm back to the: "missing reference to target.health" error.
If it helps,
I'm using PUN 2.22 and Unity 2020.1.2f1
Any insight helps, thanks!
if (playerHealthSlider != null) { playerHealthSlider.value = target.health; }
After debugging, the specific issue is a missing reference to target.health.
Furthermore, the plot thickens; Sometimes when I reset Unity, I will get another error, " Failed to load My Robot Kyle, make sure it's in a Recources folder". (But IT IS in a resource folder).
Resetting Unity fixes this, but then I'm back to the: "missing reference to target.health" error.
If it helps,
I'm using PUN 2.22 and Unity 2020.1.2f1
Any insight helps, thanks!
0
Comments
-
SOLVED: I had a single "=" instead of a "==" in my If-statement!
This was the typo:if (_target = null) { Debug.LogError("<Color=Red><a>Missing</a></Color> target for Player UI "); return; }
0