Temp3D.cs 378 B

123456789101112131415
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class Temp3D : MonoBehaviour
  6. {
  7. public GameObject[] layer;
  8. public void ChangeLayer(int index) {
  9. for (int i = 0; i < layer.Length; i++) {
  10. layer[i].gameObject.SetActive(false);
  11. }
  12. layer[index].gameObject.SetActive(true);
  13. }
  14. }