Hello.
I’d like to know how to share a variable that acts as a “private” in the context that it is specific to the object it is attached to, instead of globally referencing every instance of that variable, but I need this variable to communicate with another object.
Consider an enemy object prefab with a healthbar child. This enemy needs to keep its own health amount but the healthbar also needs to know how much health it has. How could I share a variable like that? Thank you for reading.