Class EyeAnimator
Full implementation of the EyeAnimatorBase for use with the FaceToon Shader and Unity Materials. For custom implementations, use the EyeAnimatorBase class."/>
[ExecuteInEditMode]
public class EyeAnimator : EyeAnimatorBase, IEyeController
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourEyeAnimator
- Implements
- Inherited Members
Fields
EyeObjectReference
[Header("Setup")]
[Tooltip("The object which will be used as eye origin to calculate the lookAt direction.")]
public Transform EyeObjectReference
Field Value
- Transform
Properties
EyeClosedAmount
How much should the left/right eye be closed. 0 is the index of the open eye. Increase number to close the eye.
public override Vector2 EyeClosedAmount { get; set; }
Property Value
- Vector2
Remarks
When implementing this property, ignore negatives values and ensure the value does not exceed the number of frames in the collection.
EyeSet
The Eye Set to be used for the Eye. Modify this property to change the eye set.
public override FT_EyeSet EyeSet { get; set; }
Property Value
Remarks
When implementing this property, ignore any null fields manually. EyeSet may be null or contain null fields. Those denote values which should not be changed. It is recommended to use the MergeWith(FT_EyeSet) method to merge the new eye set with the current one."/>
LookAtPosition
LookAt position for the eyes in world space.
public override Vector3 LookAtPosition { get; set; }
Property Value
- Vector3
Remarks
Ignores (0,0,0) values. Those are used to denote that the LookAt position should not be modified.
Methods
Awake()
public void Awake()
ForceUpdate()
Forces the eye to update immediately.
public override void ForceUpdate()
Remarks
Hook this code to your Material Update code to force the eye to update immediately.
Update()
public void Update()