Skip to content
Snippets Groups Projects
SpaceTagAnzeigen.cs 664 B
Newer Older
Meike Wienholt's avatar
Meike Wienholt committed
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpaceTagAnzeigen : MonoBehaviour
{

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKey("space"))
        {
            for (int i = 0; i <= this.gameObject.transform.childCount; i++)
            {
                this.gameObject.transform.GetChild(i).gameObject.SetActive(true);
            }
        }
        else
        {
            for (int i = 0; i <= this.gameObject.transform.childCount; i++)
            {
                this.gameObject.transform.GetChild(i).gameObject.SetActive(false);
            }
        }
    }
}