I have a gameobject with a script that has a string variable. I have duplicated this gameobject four times.
I want to reference this string from each duplicate from another script, but I can’t seem to do it correctly because the four gameobjects are referencing a single script.
Rather than having to duplicate this script four times along with the gameobject, is there a way to reference a variable from a gameobject rather than directly from the script?