Summary
A group of
Animancer.AnimancerNodes which are cross-fading.- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
- Base Types
-
- Object
- Updatable
graph BT
Type-->Base0["Updatable"]
click Base0 "/animancer-v7-4/api/Animancer/Updatable"
Base0-->Base1["Object"]
Type-.->Interface0["IUpdatable"]
click Interface0 "/animancer-v7-4/api/Animancer/IUpdatable"
Type-.->Interface1["ICloneable<FadeGroup>"]
Type-.->Interface2["ICopyable<FadeGroup>"]
Type-.->Interface3["IHasDescription"]
click Interface3 "/animancer-v7-4/api/Animancer/IHasDescription"
Type["FadeGroup"]
class Type type-node
Syntax
public class FadeGroup : Updatable, IUpdatable, ICloneable<FadeGroup>, ICopyable<FadeGroup>,
IHasDescription
Remarks
Documentation:
Custom Fade
Example:
void FadeGroupExample(AnimancerComponent animancer, AnimationClip clip)
{
// Start fading the animation normally.
var state = animancer.Play(clip, 0.25f);
// Then a custom CalculateProgress delegate to modify it.
state.FadeGroup.CalculateProgress = t => t * t;// Square the 0-1 value to start slow and end fast.
// The Easing class has lots of standard mathematical curve functions.
state.FadeGroup.CalculateProgress = Easing.Sine.InOut;
// Or you can use the Easing.Function enum.
state.FadeGroup.SetEasing(Easing.Function.SineInOut);
}Properties
| Name | Value | Summary |
|---|---|---|
| Easing | Func |
[Pro-Only] An optional function for modifying the fade curve.
|
| FadeDuration | float |
The total amount of time this fade will take to complete (in seconds).
|
| FadeIn | NodeWeight |
The node which is fading towards the
Animancer.FadeGroup.TargetWeight. |
| FadeOut | IReadOnlyList |
The nodes which are fading out.
|
| FadeSpeed | float |
The speed at which the
Animancer.FadeGroup.NormalizedTime increases. |
| Graph | AnimancerGraph |
The
Animancer.AnimancerNodeBase.Graph. |
| IsValid | bool |
Should this fade continue?
|
| Keep |
bool |
Should the fading nodes always be connected to the
Animancer.FadeGroup.ParentPlayable? |
| NormalizedTime | float |
The 0-1 progress of this fade.
|
| Parent | AnimancerNodeBase |
The
Animancer.AnimancerNodeBase.Graph. |
| ParentPlayable | Playable |
The
Animancer.AnimancerNodeBase.Playable of the Animancer.FadeGroup.Parent. |
| Remaining |
float |
The remaining amount of time this fade will take to complete (in seconds).
|
| TargetWeight | float |
The
Animancer.AnimancerNode.Weight which the Animancer.FadeGroup.FadeIn is moving towards. |
Methods
| Name | Value | Summary |
|---|---|---|
| AppendDescription |
void |
Appends a detailed descrption of the current details of this object.
|
| ApplyWeights |
void |
Recalculates the node weights based on the
Animancer.FadeGroup.NormalizedTime.
|
| Assert |
void |
[Assert-Conditional] Checks
Animancer.OptionalWarning.FadeEasingBounds.static
|
| Cancel |
void |
Interrupts this fade and releases it to the
Animancer.ObjectPool`1. |
| Clone |
FadeGroup |
Creates a new object with the same type and values this.
|
| CloneForSingleTarget |
FadeGroup |
Creates a clone of this
Animancer.FadeGroup for a single target node (`copyTo`). |
| Contains |
bool |
Does this fade affect the `node`?
|
| CopyFrom |
void |
Copies the contents of `copyFrom` into this object, replacing its previous contents.
|
| GetTargetWeight |
float |
Returns the
Animancer.FadeGroup.TargetWeight if the `node` is the Animancer.FadeGroup.FadeIn.
Otherwise, returns 0.
|
| Remove |
bool |
Removes the `node` from this
Animancer.FadeGroup and returns true if successful. |
| ResetFades |
void |
Re-assigns this to the
Animancer.AnimancerNode.FadeGroups. |
| SetFades |
void |
Assigns this to the
Animancer.AnimancerNode.FadeGroups. |
| SetNode |
void |
Assigns the
Animancer.FadeGroup.FadeIn with no Animancer.FadeGroup.FadeOut. |
| SetNodes |
void |
Assigns the target nodes that will be faded.
|
| StartFade |
void |
Registers this fade to be updated.
|
| StartFade |
void |
Sets the starting values and registers this fade to be updated.
|
| Update |
void |
Updates this object.
|
Extension Methods
| Name | Value | Summary |
|---|---|---|
| SetEasing |
void |
[Pro-Only]
Assigns the
Animancer.Easing.GetDelegate(Animancer.Easing.Function) as the
Animancer.FadeGroup.Easing.
From FadeGroupExtensions
|
| SetEasing |
void |
[Pro-Only]
Assigns the `function` as the
Animancer.FadeGroup.Easing.
From FadeGroupExtensions
|