- Home /
uGUI element component names? 4.6 Beta
What are the names of the new GUI system elements? Because I'm trying to set the button property of a uGUI element to disabled, but I don't know what "Component" I should get.
GUI Elements are the old system of GUITextures and GUIText etc. I'm guessing you aren't referring to this?
Answer by morgan23 · Aug 25, 2014 at 03:43 PM
heres an example from one of my scripts to get the text of the new guy system. I hope this helps you.
using UnityEngine.UI;
public Text HealthText;
public Text NameText;
HealthText.gameObject.SetActive(true);
NameText.gameObject.SetActive(true);
HealthText.text = ShipLife.ToString();
NameText.text = gameObject.name.ToString();
Answer by Landern · Aug 25, 2014 at 04:28 PM
From the UnityEngine.UI namespace:
Text
Toggle
Slider
Scrollbar
InputField
Image
Button
And probably some others.
Your answer
Follow this Question
Related Questions
How to disable my Script and Gui 1 Answer
turn .cs file on and off with keypress???? 1 Answer
Enable/Disable Game Object With GUI Button 1 Answer
Simple text in inspector components? 2 Answers
Custom Inspector, Access built-in component icons? 2 Answers