2023-06-08 14:09:50 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
namespace BITKit
|
|
|
|
{
|
|
|
|
public class AutoSetLayer : MonoBehaviour
|
|
|
|
{
|
|
|
|
public int layer;
|
2024-02-21 01:40:53 +08:00
|
|
|
private void Start()
|
2023-06-08 14:09:50 +08:00
|
|
|
{
|
|
|
|
GetComponentsInChildren<Transform>(true).ForEach(x=>
|
|
|
|
{
|
|
|
|
x.gameObject.layer=layer;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|