Requirements
- Unity 2021.3 or later
- Any Render Pipeline (Standard, URP, HDRP)
Installation
- Import the Camera Object Fader package into your Unity project
- The package will be located at:
Assets/QuickSetup/CameraObjectFader/
Basic Setup
Step 1: Add the Controller
- Select your Main Camera in the Hierarchy
- Click Add Component > Camera Object Fader > Camera Fade Controller
Step 2: Assign Your Target
- In the Inspector, find the “Targets” list
- Drag your Player GameObject into the list
- Set the “Fade Layer” mask to include layers that should fade (e.g., Environment, Walls, Props)
- Objects NOT on this layer will never be affected
Testing
- Press Play
- Move your camera so an object is between the camera and your player
- The obstructing object should fade out automatically
- When the obstruction clears, the object returns to full opacity