GameObjectExtensions.SetLayer
Declaration#
public static void SetLayer(GameObject gameObject, Int32 layer, bool recursive)Parameters#
| Name | Description |
|---|---|
| gameObject | GameObject to update |
| layer | Layer to set |
| recursive | Set all children |
Description#
Set the layer of a GameObject
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class ExampleObject : MonoBehaviour{
private void Start() { gameObject.SetLayer(2, true); }
}