Project
Beginner Gameplay Scripting
Activating GameObjects
Tutorial
Beginner
5 Mins
Unity Technologies
Overview
You have completed 0% of this Tutorial.
1.
Activating GameObjects
Summary
How to handle the active status of GameObjects in the scene, both independently and within Hierarchies, using SetActive and activeSelf / activeInHierarchy.
Language
English
Recommended Unity Versions
4
1.
Activating GameObjects

ActiveObjects

using UnityEngine; using System.Collections; public class ActiveObjects : MonoBehaviour { void Start () { gameObject.SetActive(false); } }

CheckState

using UnityEngine; using System.Collections; public class CheckState : MonoBehaviour { public GameObject myObject; void Start () { Debug.Log("Active Self: " + myObject.activeSelf); Debug.Log("Active in Hierarchy" + myObject.activeInHierarchy); } }

Woohoo! You nailed this tutorial.
Continue rocking your Beginner Gameplay Scripting project.
Next Step:
Translate and Rotate
Tutorial
Beginner
5 Mins
Unity Technologies