I have a GUIText element called “item” in my project. I also have another element called “item list”. I would like the “item list” element to change the text in the GUIText element in its Awake/Start function. How would I go about doing that?
Alienchild, check out the “Accessing other Components” and “Acessing other GameObjects” pages in the Unity documentation. Hopefully the two scripts are the same language (either C# or Javascript). If they’re different languages, it’s going to take a bit more work, so also see “Overview: Script Compilation”.
Actually the GUIText element does not have a script, the text is a property of the element itself. You know, like Field of View on a camera.
Hence “Acessing other GameObjects”; the GUIText is a Component attached to a GameObject. The script attached to your “item list” needs to get a reference to the GUIText object – either by assigning it via the inspector, or by looking it up in code. You can then set whatever properties you want.