When the character is created one of the required components is the Character Layer Manager. The Character Layer Manager specifies which layers the character should collide with or ignore. When the Update Layers button is pressed the controller will add the required layers to elements 26 – 31:

  • Layer 26 – Enemy: Used by the Crosshairs Monitor to determine if the target object is an enemy.
  • Layer 27 – Moving Platform: Used by the Moving Platform component to indicate that the character should automatically move with the object.
  • Layer 28 – Visual Effect: Used by shells, explosions, reloadingable clips, etc. Will not cause collisions with the character.
  • Layer 29 – Overlay: Used while in first person mode using the standard render pipeline, indicates which objects should be rendered first (such as the arms).
  • Layer 30 – SubCharacter: Child colliders of the character which do not affect collision (such as ragdoll colliders).
  • Layer 31 – Character: The layer of the main character collider.

If you have existing layers that occupy those elements then you can manually change these elements by modifying LayerManager.cs. Unfortunately because these layers have to be static there isn’t a way to modify it without changing the source code. Ensure these layers are updated before the character is built so the correct indices will be used.

Enemy Layers

Layer Mask that specifies the layer that the enemies use.

Invisible Layers

Layer Mask that specifies any layers that are invisible to the character (such as water or invisible planes placed on top of stairs).

Solid Layers

Layer mask that specifies any layers that represent a solid object (such as the ground or a moving platform).

An example use is for the collision detection by the character controller. The controller will use the Solid Layers mask to determine what is considered the ground to prevent the character from falling through the floor.