Skip to content

SetLayer

Changes the layer of a rigidbody's GameObject.

Namespace: Jungle.Physics
Inherits: InstantPhysicsOperation

Overview

SetLayer is a physics operation that changes the Unity layer of the target rigidbody's GameObject. Optionally applies the change recursively to all children. Useful during physics transitions where layer-based collision filtering needs to change.

Properties

Property Type Description
targetLayer int The layer to assign.
includeChildren bool When true, sets the layer on all child GameObjects recursively.

See Also