I have the same question as the user at this link (Using Unity Events - Lecture 163 rpg), but the answer is on Udemy, which I don’t have access to as I only use this site. Could you copy and post the relevant information from Udemy here? Thanks!
Even worse, the actual solution was worked out on discored. Fortunately, I documented it in the Unity Q/A:
It looks like this may have been identified and solved in our Discord, so I’ll summarize what Aftermath came up with in Discord. I certainly came up with the wrong solution there, but once I saw Aftermath’s suggestion, I was fairly sure this was the issue, it matches the error code:
Aftermath: When I ran into that, it was because in the TakeDamage Event, I selected the DamageTextSpawner prefab from the project folder rather than dragging the one from the scene.
Essentially what this means is you need to make sure the DamageTextSpawner you select in the event dialogue on Health is the DamageTextSpawner in the heirarchy under the GameObject, not the DamageTextSpawner in the Assets folder.
Thanks! That solved it.
One of the joys of programming in Unity is that some of the error messages appear to need an interpreter who speaks gibberish. I remember that conversation in Discord, it took several of us brainstorming, and of course looking at the inspector, there’s no reason at first blush to believe the issue was the wrong item in the Event, it wasn’t technically related to the error message.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.