1
This commit is contained in:
17
Unity/Scripts/Components/AutoSetLayer.cs
Normal file
17
Unity/Scripts/Components/AutoSetLayer.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
namespace BITKit
|
||||
{
|
||||
public class AutoSetLayer : MonoBehaviour
|
||||
{
|
||||
public int layer;
|
||||
void Start()
|
||||
{
|
||||
GetComponentsInChildren<Transform>(true).ForEach(x=>
|
||||
{
|
||||
x.gameObject.layer=layer;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user