Class CinemachineTriggerAction
A multi-purpose script which causes an action to occur when a trigger collider is entered and exited.
Inherited Members
Component.GetComponentIndex()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Scene)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[AddComponentMenu("Cinemachine/Helpers/Cinemachine Trigger Action")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineTriggerAction.html")]
public class CinemachineTriggerAction : MonoBehaviour
Fields
LayerMask
Only triggers generated by objects on these layers will be considered.
Declaration
[Header("Trigger Object Filter")]
[Tooltip("Only triggers generated by objects on these layers will be considered")]
[FormerlySerializedAs("m_LayerMask")]
public LayerMask LayerMask
Field Value
Type | Description |
---|---|
LayerMask |
OnObjectEnter
What action to take when an eligible object enters the collider or trigger zone
Declaration
[Tooltip("What action to take when an eligible object enters the collider or trigger zone")]
[FormerlySerializedAs("m_OnObjectEnter")]
public CinemachineTriggerAction.ActionSettings OnObjectEnter
Field Value
Type | Description |
---|---|
CinemachineTriggerAction.ActionSettings |
OnObjectExit
What action to take when an eligible object exits the collider or trigger zone
Declaration
[Tooltip("What action to take when an eligible object exits the collider or trigger zone")]
[FormerlySerializedAs("m_OnObjectExit")]
public CinemachineTriggerAction.ActionSettings OnObjectExit
Field Value
Type | Description |
---|---|
CinemachineTriggerAction.ActionSettings |
Repeating
Repeat the action for all subsequent trigger entries
Declaration
[Tooltip("Repeat the action for all subsequent trigger entries")]
[FormerlySerializedAs("m_Repeating")]
public bool Repeating
Field Value
Type | Description |
---|---|
bool |
SkipFirst
Skip this many trigger entries before taking action
Declaration
[Tooltip("Skip this many trigger entries before taking action")]
[FormerlySerializedAs("m_SkipFirst")]
public int SkipFirst
Field Value
Type | Description |
---|---|
int |
WithTag
If set, only triggers generated by objects with this tag will be considered
Declaration
[Tooltip("If set, only triggers generated by objects with this tag will be considered")]
[FormerlySerializedAs("m_WithTag")]
public string WithTag
Field Value
Type | Description |
---|---|
string |
WithoutTag
Triggers generated by objects with this tag will be ignored
Declaration
[Tooltip("Triggers generated by objects with this tag will be ignored")]
[FormerlySerializedAs("m_WithoutTag")]
public string WithoutTag
Field Value
Type | Description |
---|---|
string |