Class OverrideRigConstraint<TConstraint, TJob, TData, TBinder>
Use this class to define an override rig constraint on another rig constraint. While the overriden constraint data remains the same, the job is overriden.
Namespace: UnityEngine.Animations.Rigging
Syntax
public class OverrideRigConstraint<TConstraint, TJob, TData, TBinder> : IRigConstraint where TConstraint : MonoBehaviour, IRigConstraint where TJob : struct, IWeightedAnimationJob where TData : struct, IAnimationJobData where TBinder : AnimationJobBinder<TJob, TData>, new()
Type Parameters
Name | Description |
---|---|
TConstraint | The base constraint to override |
TJob | The override job |
TData | The constraint data |
TBinder | The override constraint job binder |
Constructors
OverrideRigConstraint(TConstraint)
Constructor
Declaration
public OverrideRigConstraint(TConstraint baseConstraint)
Parameters
Type | Name | Description |
---|---|---|
TConstraint | baseConstraint | The constraint to override. |
Fields
m_Constraint
The base constraint.
Declaration
[SerializeField]
protected TConstraint m_Constraint
Field Value
Type | Description |
---|---|
TConstraint |
Properties
weight
The constraint weight. This is a value between 0 and 1.
Declaration
public float weight { get; set; }
Property Value
Type | Description |
---|---|
Single |
Implements
Methods
CreateJob(Animator)
Creates the animation job for this constraint.
Declaration
public IAnimationJob CreateJob(Animator animator)
Parameters
Type | Name | Description |
---|---|---|
Animator | animator | The animated hierarchy Animator component. |
Returns
Type | Description |
---|---|
IAnimationJob | Returns the newly instantiated job. |
Implements
DestroyJob(IAnimationJob)
Frees the specified job memory.
Declaration
public void DestroyJob(IAnimationJob job)
Parameters
Type | Name | Description |
---|---|---|
IAnimationJob | job |
Implements
IsValid()
Retrieves the constraint valid state.
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
Boolean | Returns true if constraint data can be successfully evaluated. Returns false otherwise. |
Implements
UpdateJob(IAnimationJob)
Updates the specified job data.
Declaration
public void UpdateJob(IAnimationJob job)
Parameters
Type | Name | Description |
---|---|---|
IAnimationJob | job |
Implements
Explicit Interface Implementations
IRigConstraint.binder
The job binder for the constraint.
Declaration
IAnimationJobBinder IRigConstraint.binder { get; }
Returns
Type | Description |
---|---|
IAnimationJobBinder |
Implements
IRigConstraint.component
The component for the constraint.
Declaration
Component IRigConstraint.component { get; }
Returns
Type | Description |
---|---|
Component |
Implements
IRigConstraint.data
The data container for the constraint.
Declaration
IAnimationJobData IRigConstraint.data { get; }
Returns
Type | Description |
---|---|
IAnimationJobData |