Object Hider
The BeamObjectHider
component is a utility that allows you to conveniently and automatically hide objects from your capture. You can specify the camera type as well as the types of objects it should hide. All of the underlying logic is performed utilising Unity's layers.
Setting Up The Hider
For the most part, you shouldn't have to change any of the settings of the Object Hider, unless you are wanting to only hide the object during specific views.
As an example, the Director Kit and the included examples hide the player's head object when in first person view, and the preview panel of the Director Kit when in selfie mode. This prevents rendering issues when the player moves around and the camera phases through their geometry.
Complex Layer Logic
In certain scenarios your game may potentially be using layers for more complex rendering, such as if the player has visual objects attached to their face, or you are using mirrors.
It is advised at this point to setup your BeamCamera
for manual hiding layers with the following steps.
- First, untick the
Automatic Hidden Layer
on yourBeamCamera
. - Next, create a new layer for Beam to use as its hiding purposes. You can use a pre-existing layer if you wish.
- Now assign the layer to the
Layers To Hide
andSpecific Beam Layer
. - Make sure the
Add Beam Layer To Main Cam
item is ticked, otherwise your player will no longer see the object when it is hidden. - Finally, if you want to hide a specific object, add the
BeamObjectHider
component to it, and choose your settings as desired.- You may need to modify the settings so that
Change Object Layer
option is unticked. This will prevent potential issues with your pre-existing logic.
- You may need to modify the settings so that