Files

17 lines
369 B
C#
Raw Permalink Normal View History

2024-01-23 02:56:26 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BITKit
{
public class AutoSetLayer : MonoBehaviour
{
public int layer;
2024-03-04 18:45:21 +08:00
private void Start()
2024-01-23 02:56:26 +08:00
{
GetComponentsInChildren<Transform>(true).ForEach(x=>
{
x.gameObject.layer=layer;
});
}
}
}