Hello, sorry for asking such a simple question. I hope it’s fast to answer so I dont take away much time from any of you.
Anyways, in my small Unity Game, I have a script called “PlayerData.js” within this is a bunch of public variables (such as health, score, etc.). However, I have a second script called “ZombieAttack.js”. Within this script, I want to be able to change the varaiable called “PlayerHealth” within the “PlayerData.js” script. Is this possible?
If so, how?
Just for clarification, essentially I want to change a public variable defined in a script, with another script.