---
title: "Cómo activar GameObjects"
content_type: tutorial
url: "https://learn.unity.com/tutorial/como-activar-gameobjects?language=es"
language: es
difficulty: beginner
duration_minutes: 5
unity_version:
  - "2019.3"
  - "2019.2"
  - "2019.1"
  - "2018.4"
  - "2018.3"
  - "2018.2"
  - "2018.1"
  - "2017.4"
  - "2017.3"
  - "2017.2"
  - "2017.1"
  - "5.x"
  - "4.x"
supported_unity_versions:
  - name: "2019.3"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2019.3"
  - name: "2019.2"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2019.2"
  - name: "2019.1"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2019.1"
  - name: "2018.4"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2018.4"
  - name: "2018.3"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2018.3"
  - name: "2018.2"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2018.2"
  - name: "2018.1"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2018.1"
  - name: "2017.4"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2017.4"
  - name: "2017.3"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2017.3"
  - name: "2017.2"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2017.2"
  - name: "2017.1"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=2017.1"
  - name: "5.x"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=5.x"
  - name: "4.x"
    url: "https://learn.unity.com/tutorial/como-activar-gameobjects.md?language=es&version=4.x"
last_updated: "2026-08-04T14:23:32.000Z"
---

# Cómo activar GameObjects

Aprende a controlar el estado activo de los GameObjects en la escena y en jerarquías usando SetActive, activeSelf y activeInHierarchy.

Cómo manejar el estado activo de los GameObjects dentro de la escena independientemente y a través de jerarquías o Hierarchies usando SetActive y activeSelf o activeinHierarchy.

Este tutorial está incluido en el proyecto [_Scripting_ para principiantes. ](https://learn.unity.com/project/scripting-para-principiantes)

Previo: [Cómo habilitar y deshabilitar componentes](https://learn.unity.com/tutorial/habilitar-y-deshabilitar-componentes?language=es&publish=true)

Siguiente:  Translate y Rotate

## Cómo activar GameObjects

[Video](http://www.youtube.com/watch?v=MhPFB-rAdlg)

## **ActiveObjects**

```csharp
using UnityEngine;
using System.Collections;

public class ActiveObjects : MonoBehaviour
{
    void Start ()
    {
        gameObject.SetActive(false);
    }
}
```

## **CheckState**

```csharp
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);
    }
}
```
