Hello first post! So my problem seems pretty simple. I need to access a scripts variable from another script (They AREN’T in the same object though).
Now I did some search on here and saw the js equivalent and tried converting that to C# but to no avail.
First some info…
GridScript is an Empty Object holding my script GridMaker.
Im currently writing this code in another script call GUI. Located in another Empty Object somewhere else.
What I want…
Is to be able to get access to all the public variables inside my GridMaker script.
Here is what I wrote!
Start()
{
GameObject grid = GameObject.Find(“GridScript”);
grid.GetComponent(“GridMaker”).NOTHING is HERE
}
I dont see any of my variables or functions here. I tested to make sure the GomeObject grid does compile…and it does!
Any ideas! =(