Hey There. I’ve just started using Unity and are making a game. I have a thing(variable I think its called) in one script saying " teamOneName = teamOne.text;". I need to use teamOne on another script and have no idea on how I do that. Any help is welcome.
Thanks
You need to get a reference to this other component, and then you access the variable directly if you set is as public, or return in through a public method (function). There are a variety of ways to get the reference to the component. You can set via the inspector, you can use GetComponent, you can find the GameObject it is attached to or have it supplied through a collision. Read through the manual or search for topics here on getting references to objects and components.