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

var active : boolean

Description

Is the GameObject active? Activates/Deactivates the GameObject.

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

using UnityEngine;
using System.Collections;

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

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Example():
gameObject.active = false