Files

17 lines
369 B
C#
Raw Permalink Normal View History

2024-06-03 10:11:43 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BITKit
{
public class AutoSetLayer : MonoBehaviour
{
public int layer;
private void Start()
{
GetComponentsInChildren<Transform>(true).ForEach(x=>
{
x.gameObject.layer=layer;
});
}
}
}