Files
BITFALL/Assets/BITKit/Unity/Scripts/Components/AutoSetLayer.cs
CortexCore 0f47d7199d 1
2024-02-21 01:40:53 +08:00

17 lines
369 B
C#

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;
});
}
}
}