Class InputAxisControllerBase<T>
This is a base class for a behaviour that is used to drive IInputAxisOwner behaviours, which it discovers dynamically. It is the bridge between the input system and Cinemachine cameras that require user input. Add it to a Cinemachine camera that needs it. If you want to read inputs from a third-party source, then you must specialize this class with an appropriate implementation of IInputAxisReader.
Implements
Inherited Members
Namespace: Unity.Cinemachine
Assembly: solution.dll
Syntax
[ExecuteAlways]
public abstract class InputAxisControllerBase<T> : MonoBehaviour, IInputAxisController where T : IInputAxisReader, new()
Type Parameters
Name | Description |
---|---|
T | The axis reader that will read the inputs. |
Fields
Name | Description |
---|---|
ScanRecursively | If set, a recursive search for IInputAxisOwners behaviours will be performed. |
SuppressInputWhileBlending | If set, input will not be processed while the Cinemachine Camera is participating in a blend. |
Properties
Name | Description |
---|---|
Controllers | This list is dynamically populated based on the discovered axes |
Methods
Name | Description |
---|---|
InitializeControllerDefaultsForAxis(in AxisDescriptor, Controller) | Creates default controllers for an axis. Override this if the default axis controllers do not fit your axes. |
OnDisable() | Called by Unity when the inspector component is disabled |
OnEnable() | Called by Unity when the inspector component is enabled |
OnValidate() | Editor only: Called by Unity when the component is serialized or the inspector is changed. |
Reset() | Called by Unity when the component is reset. |
SynchronizeControllers() | Normally we should have one controller per IInputAxisOwner axis. |
UpdateControllers() | Read all the controllers and process their input. |