GameObject.active Manual     Reference     Scripting  
Scripting > Runtime Classes > GameObject
GameObject.active

var active : boolean

Description

Is the GameObject active? Activates/Deactivates the GameObject.

JavaScripts
// Deactivates the game object.
gameObject.active = false;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
gameObject.active = false;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
gameObject.active = false