Class CinemachineFreeLookModifier.Modifier
Interface for an object that will modify some aspect of a FreeLook camera based on the vertical axis value.
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[Serializable]
public abstract class CinemachineFreeLookModifier.Modifier
Properties
CachedComponentType
Type of the cached component (null if no cached component). If this modifier targets specific components, this value indicates the type of that component. The modifier should cache the component, for performance. ComponentModifier for a base class for implementing this.
Declaration
public virtual Type CachedComponentType { get; }
Property Value
Type | Description |
---|---|
Type |
HasRequiredComponent
Return true if cached vcam component is present or not required
Declaration
public virtual bool HasRequiredComponent { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
AfterPipeline(CinemachineVirtualCameraBase, ref CameraState, float, float)
Called from extension's PostPipelineStageCallback(Finalize). Perform any necessary actions to state, and restore any camera parameters changed in BeforePipeline(CinemachineVirtualCameraBase, ref CameraState, float, float).
Declaration
public virtual void AfterPipeline(CinemachineVirtualCameraBase vcam, ref CameraState state, float deltaTime, float modifierValue)
Parameters
Type | Name | Description |
---|---|---|
CinemachineVirtualCameraBase | vcam | vcam owner |
CameraState | state | current vcam state. May be modified in this function |
float | deltaTime | current applicable deltaTime |
float | modifierValue | The normalized value of the modifier variable. |
BeforePipeline(CinemachineVirtualCameraBase, ref CameraState, float, float)
Called from extension's PrePipelineMutateCameraState(). Perform any necessary actions to modify relevant camera settings. Original camera settings should be restored in AfterPipeline(CinemachineVirtualCameraBase, ref CameraState, float, float).
Declaration
public virtual void BeforePipeline(CinemachineVirtualCameraBase vcam, ref CameraState state, float deltaTime, float modifierValue)
Parameters
Type | Name | Description |
---|---|---|
CinemachineVirtualCameraBase | vcam | vcam owner |
CameraState | state | current vcam state. May be modified in this function |
float | deltaTime | current applicable deltaTime |
float | modifierValue | The normalized value of the modifier variable. |
RefreshCache(CinemachineVirtualCameraBase)
Called from OnEnable and from the inspector. Refresh any performance-sensitive stuff.
Declaration
public virtual void RefreshCache(CinemachineVirtualCameraBase vcam)
Parameters
Type | Name | Description |
---|---|---|
CinemachineVirtualCameraBase | vcam | the virtual camera owner |
Reset(CinemachineVirtualCameraBase)
Called when the modifier is created. Initialize fields with appropriate values.
Declaration
public virtual void Reset(CinemachineVirtualCameraBase vcam)
Parameters
Type | Name | Description |
---|---|---|
CinemachineVirtualCameraBase | vcam | the virtual camera owner |
Validate(CinemachineVirtualCameraBase)
Called from OnValidate in the editor. Validate and sanitize the fields.
Declaration
public virtual void Validate(CinemachineVirtualCameraBase vcam)
Parameters
Type | Name | Description |
---|---|---|
CinemachineVirtualCameraBase | vcam | the virtual camera owner |