World

Layers

The Unity layers Basis uses, what each one means for collisions, interaction and cameras, and which to use for your objects.

Basis reserves several Unity layers. Use them as described so players, pointers and cameras treat your objects correctly.

#LayerUsed for
0DefaultOrdinary world geometry. Players collide with it and pointers hit it.
1TransparentFXUnity default.
2Ignore RaycastNot hit by pointers or raycasts, and ignored by the third person camera.
3PlayerThe local player's character controller.
4WaterUnity default.
5UIWorld space UI.
6LocalPlayerAvatarYour own avatar. Hidden from your first person view where needed.
7RemotePlayerAvatarOther players' avatars.
8InteractableObjects the pointer should highlight and interact with.
9OverlayUIUI drawn over everything, such as the menu.
10IgnoredByInteractableVisible and solid, but pointers pass through. Use for glass or trigger volumes in front of buttons.
11HandHeldCameraUIThe hand held camera's own UI.

Choosing a layer

  • Walls, floors, props: Default.
  • Trigger volumes and invisible blockers in front of buttons: IgnoredByInteractable. Pointers pass through to what is behind them.
  • Decorative colliders the pointer should never hit: Ignore Raycast.
  • Never put your objects on Player, LocalPlayerAvatar, RemotePlayerAvatar or OverlayUI.

The layer names and numbers come from the Basis project's Tag Manager. Content is built with them. Do not rename or reorder Basis layers in your project.

Edit on GitHub

Last updated on

On this page