34 lines
643 B
C#
34 lines
643 B
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class SetFalse : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
public Transform[] hiddenChildren;
|
|||
|
|
|
|||
|
|
[ContextMenu("<22><><EFBFBD><EFBFBD>")]
|
|||
|
|
// Start is called before the first frame update
|
|||
|
|
void Setttt()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
HideChildrenRecursively(transform);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void Start()
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void HideChildrenRecursively(Transform parent)
|
|||
|
|
{
|
|||
|
|
foreach (Transform child in parent)
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD>ص<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
child.gameObject.SetActive(false);
|
|||
|
|
// <20>ݹ<EFBFBD><DDB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
HideChildrenRecursively(child);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|