User Manual

API REFERENCE

NAMESPACE

using CameraObjectFader;

CLASS: CameraFadeController

The main controller component. Attach this to your camera.

PUBLIC PROPERTIES (Singleton)

PropertyDescriptionExample
static CameraFadeController InstanceThe global access point for the controller.CameraFadeController.Instance.SetTarget(...);

PUBLIC METHODS

APIFunctionExample
SetTarget(Transform)Clears all current targets and sets a single new target.CameraFadeController.Instance.SetTarget(player.transform);
AddTarget(Transform)Adds a target to the list without removing existing ones. Does nothing if the target is null or already in the list.CameraFadeController.Instance.AddTarget(companion.transform);
RemoveTarget(Transform)Removes a specific target from the list.CameraFadeController.Instance.RemoveTarget(deadCharacter.transform);
ClearTargets()Removes all targets. Fading operations will stop until new targets are added.CameraFadeController.Instance.ClearTargets();

PUBLIC EVENTS (UnityEvent)

EventDescriptionExample
onObstructionStartInvoked when at least one object starts obstructing the view.Instance.onObstructionStart.AddListener(OnBlocked);
onObstructionEndInvoked when all obstructions are cleared and fading is complete.Instance.onObstructionEnd.AddListener(OnCleared);

CLASS: FadeableObject

Automatically added to objects that need fading. You typically don’t interact

with this class directly, but it is public if needed.

PUBLIC PROPERTIES

PropertyTypeDescription
fadeChildrenboolWhether child renderers are included in the fade effect.

PUBLIC METHODS

APIFunctionNotes
Initialize()Finds all renderers and stores original materials.Called automatically.
SetFadeTarget(float, float)Sets the target alpha and fade speed.Called by CameraFadeController.
ManualUpdate(float)Updates the fading interpolation. Returns false when fully restored.N/A

CLASS: FaderIgnore

A simple marker component. Objects with this component are never faded.

Has no public methods or properties - its presence is the only requirement.