默认隐藏所有物体
This commit is contained in:
parent
fb4dcaa339
commit
0862d8d2cb
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e04c3287aa301c64a9884ebfb728ee54
|
||||
guid: ab772d8ef92f5704aa54a8f1a5e6a643
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
33
Assets/Scenes/Scripts/SetFalse.cs
Normal file
33
Assets/Scenes/Scripts/SetFalse.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SetFalse : MonoBehaviour
|
||||
{
|
||||
|
||||
public Transform[] hiddenChildren;
|
||||
|
||||
[ContextMenu("隐藏")]
|
||||
// Start is called before the first frame update
|
||||
void Setttt()
|
||||
{
|
||||
|
||||
HideChildrenRecursively(transform);
|
||||
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
}
|
||||
|
||||
void HideChildrenRecursively(Transform parent)
|
||||
{
|
||||
foreach (Transform child in parent)
|
||||
{
|
||||
// 隐藏当前子物体
|
||||
child.gameObject.SetActive(false);
|
||||
// 递归调用以处理子物体的子物体
|
||||
HideChildrenRecursively(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scenes/Scripts/SetFalse.cs.meta
Normal file
11
Assets/Scenes/Scripts/SetFalse.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f127f2bf137e12439e2b140488ef479
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -2521,7 +2521,7 @@
|
||||
</ObjectToggle>
|
||||
|
||||
</Body>
|
||||
<Body name="左侧颈外动脉组" englishName="" path="Ren_NEW/SM_DongMai/SM_Aortic_arch_and_its_branches/SM_Left_common_carotid_artery/SM_Left_external_carotid_artery" >
|
||||
<Body name="左侧颈外动脉" englishName="" path="Ren_NEW/SM_DongMai/SM_Aortic_arch_and_its_branches/SM_Left_common_carotid_artery/SM_Left_external_carotid_artery" >
|
||||
|
||||
<Body name="颈外动脉" englishName="" path="Ren_NEW/SM_DongMai/SM_Aortic_arch_and_its_branches/SM_Left_common_carotid_artery/SM_Left_external_carotid_artery/SM_external_carotid_artery" tip="颈外动脉:颈总动脉两终支之一。
|
||||
初居颈内动脉的前内侧,后经其前方转至外侧,上行穿腮腺至下颌颈处分为颞浅动脉和上颌动脉两终支。">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user