UI sliders

I got two questions in regards to the new UI system in particular the sliders:

  1. What is the slider equivalent of the text UI version of text.enabled = false?

  2. I’ve created a slider (for a health bar) and I made the canvas a child to a gameobject and made it into world space. That way the slider follows the gameobject around. How do I freeze the Y-axis? so that when the gameobject rotates, the slider still faces towards the screen? I tried to adding a rigid body and even freezing everything it still moves and rotates.

Use a separate camera for your GUI, it will make things much easier. Create a layer called GUI or UI (or whatever suits you), and set a second camera’s culling mask to ONLY this layer (making sure to remove that layer from the main camera culling mask). UI elements are 2D and should be screenspace.

Alternatively, if this solution does not suit you, http://wiki.unity3d.com/index.php?title=CameraFacingBillboard pop this script on your slider game object.