27 lines
437 B
C#
27 lines
437 B
C#
using System.Collections.Generic;
|
|
using BitStrap;
|
|
using UnityEngine;
|
|
|
|
public class ChangeLayers : MonoBehaviour
|
|
{
|
|
public string layerName = "Default";
|
|
|
|
public bool recursively = true;
|
|
|
|
public List<GameObject> objects = new List<GameObject>();
|
|
|
|
private void Start()
|
|
{
|
|
Refresh();
|
|
}
|
|
|
|
[Button]
|
|
public void Refresh()
|
|
{
|
|
for (int i = 0; i < objects.Count; i++)
|
|
{
|
|
Utilities.SetLayerRecursively(objects[i], layerName);
|
|
}
|
|
}
|
|
}
|