I need to find a way where you can access variables from a script on a Game Object, when the Game Object is not defined. I know I may not be explaining this well so here’s an example of the code I tried that I know is wrong, but it kinda shows what I’m trying to do:
var x = "hello";
var y = "";
update () {
y = transform.findChild(x).getComponent(myScript).myVar
}