Newer
Older
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);
}
}
}
}