From 7f493f682503f5186308de7b8f74b5b49233cfe4 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Thu, 2 Nov 2023 11:51:31 +0800 Subject: +init --- GameCode/EnableAllChildren.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 GameCode/EnableAllChildren.cs (limited to 'GameCode/EnableAllChildren.cs') diff --git a/GameCode/EnableAllChildren.cs b/GameCode/EnableAllChildren.cs new file mode 100644 index 0000000..6f13300 --- /dev/null +++ b/GameCode/EnableAllChildren.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +public class EnableAllChildren : MonoBehaviour +{ + private void Start() + { + for (int i = 0; i < base.transform.childCount; i++) + { + base.transform.GetChild(i).gameObject.SetActive(value: true); + } + } +} -- cgit v1.1-26-g67d0