reckfellENGINE

AnimationNodeOneShot

Plays an animation once in an AnimationNodeBlendTree.

On this page
class AnimationNodeOneShotReckfellSharpInherits AnimationNodeSync

Plays an animation once in an AnimationNodeBlendTree.

A resource to add to an AnimationNodeBlendTree. This animation node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. After setting the request and changing the animation playback, the one-shot node automatically clears the request on the next process frame by setting its request value to AnimationNodeOneShot.OneShotRequest.None.

C#
// Play child animation connected to "shot" port.
animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Fire);

// Abort child animation connected to "shot" port.
animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Abort);

// Abort child animation with fading out connected to "shot" port.
animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.FadeOut);

// Get current state (read-only).
animationTree.Get("parameters/OneShot/active");

// Get current internal state (read-only).
animationTree.Get("parameters/OneShot/internal_active");

Optionally, signals can be used by setting an AnimationNodeObserverOneShot through AnimationTree.

C#
var observer = animationTree.Get("parameters/OneShot/observer").As<AnimationNodeObserverOneShot>();
observer.Started += OnOneShotStarted;

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

AnimationNodeOneShotConstructor
# AnimationNodeOneShot
C#
public AnimationNodeOneShot();

Properties10

AbortOnResetProperty
# AbortOnReset
C#
public bool AbortOnReset { get; set; }

If true, the sub-animation will abort if resumed with a reset after a prior interruption.

AutorestartProperty
# Autorestart
C#
public bool Autorestart { get; set; }

If true, the sub-animation will restart automatically after finishing. In other words, to start auto restarting, the animation must be played once with the AnimationNodeOneShot.OneShotRequest.Fire request. The AnimationNodeOneShot.OneShotRequest.Abort request stops the auto restarting, but it does not disable the AnimationNodeOneShot.Autorestart itself. So, the AnimationNodeOneShot.OneShotRequest.Fire request will start auto restarting again.

AutorestartDelayProperty
# AutorestartDelay
C#
public double AutorestartDelay { get; set; }

The delay after which the automatic restart is triggered, in seconds.

AutorestartRandomDelayProperty
# AutorestartRandomDelay
C#
public double AutorestartRandomDelay { get; set; }

If AnimationNodeOneShot.Autorestart is true, a random additional delay (in seconds) between 0 and this value will be added to AnimationNodeOneShot.AutorestartDelay.

BreakLoopAtEndProperty
# BreakLoopAtEnd
C#
public bool BreakLoopAtEnd { get; set; }

If true, breaks the loop at the end of the loop cycle for transition, even if the animation is looping.

FadeInCurveProperty
# FadeInCurve
C#
public Curve FadeInCurve { get; set; }

Determines how cross-fading between animations is eased. If empty, the transition will be linear. Should be a unit Curve.

FadeInTimeProperty
# FadeInTime
C#
public double FadeInTime { get; set; }

The fade-in duration. For example, setting this to 1.0 for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation. Note: AnimationNodeOneShot transitions the current state after the fading has finished.

FadeOutCurveProperty
# FadeOutCurve
C#
public Curve FadeOutCurve { get; set; }

Determines how cross-fading between animations is eased. If empty, the transition will be linear. Should be a unit Curve.

FadeOutTimeProperty
# FadeOutTime
C#
public double FadeOutTime { get; set; }

The fade-out duration. For example, setting this to 1.0 for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation. Note: AnimationNodeOneShot transitions the current state after the fading has finished.

MixModeProperty
# MixMode
C#
public AnimationNodeOneShot.MixModeEnum MixMode { get; set; }

The blend type.

Methods20

GetAutorestartDelaydouble
# GetAutorestartDelay
C#
public double GetAutorestartDelay();
Returns double
GetAutorestartRandomDelaydouble
# GetAutorestartRandomDelay
C#
public double GetAutorestartRandomDelay();
Returns double
GetFadeInCurveCurve
# GetFadeInCurve
C#
public Curve GetFadeInCurve();
Returns Curve
GetFadeInTimedouble
# GetFadeInTime
C#
public double GetFadeInTime();
Returns double
GetFadeOutCurveCurve
# GetFadeOutCurve
C#
public Curve GetFadeOutCurve();
Returns Curve
GetFadeOutTimedouble
# GetFadeOutTime
C#
public double GetFadeOutTime();
Returns double
GetMixModeAnimationNodeOneShot.MixModeEnum
# GetMixMode
C#
public AnimationNodeOneShot.MixModeEnum GetMixMode();
Returns AnimationNodeOneShot.MixModeEnum
HasAutorestartbool
# HasAutorestart
C#
public bool HasAutorestart();
Returns bool
IsAbortedOnResetbool
# IsAbortedOnReset
C#
public bool IsAbortedOnReset();
Returns bool
IsLoopBrokenAtEndbool
# IsLoopBrokenAtEnd
C#
public bool IsLoopBrokenAtEnd();
Returns bool
SetAbortOnResetvoid
# SetAbortOnReset
C#
public void SetAbortOnReset(bool enable);
Parameters
NameTypeDefault
enablebool—
SetAutorestartvoid
# SetAutorestart
C#
public void SetAutorestart(bool active);
Parameters
NameTypeDefault
activebool—
SetAutorestartDelayvoid
# SetAutorestartDelay
C#
public void SetAutorestartDelay(double time);
Parameters
NameTypeDefault
timedouble—
SetAutorestartRandomDelayvoid
# SetAutorestartRandomDelay
C#
public void SetAutorestartRandomDelay(double time);
Parameters
NameTypeDefault
timedouble—
SetBreakLoopAtEndvoid
# SetBreakLoopAtEnd
C#
public void SetBreakLoopAtEnd(bool enable);
Parameters
NameTypeDefault
enablebool—
SetFadeInCurvevoid
# SetFadeInCurve
C#
public void SetFadeInCurve(Curve curve);
Parameters
NameTypeDefault
curveCurve—
SetFadeInTimevoid
# SetFadeInTime
C#
public void SetFadeInTime(double time);
Parameters
NameTypeDefault
timedouble—
SetFadeOutCurvevoid
# SetFadeOutCurve
C#
public void SetFadeOutCurve(Curve curve);
Parameters
NameTypeDefault
curveCurve—
SetFadeOutTimevoid
# SetFadeOutTime
C#
public void SetFadeOutTime(double time);
Parameters
NameTypeDefault
timedouble—
SetMixModevoid
# SetMixMode
C#
public void SetMixMode(AnimationNodeOneShot.MixModeEnum mode);
Parameters
NameTypeDefault
modeAnimationNodeOneShot.MixModeEnum—

AnimationNodeOneShot.MixModeEnum

ValueDescription
Add = 1

Blends two animations additively. See also AnimationNodeAdd2.

Blend = 0

Blends two animations. See also AnimationNodeBlend2.

AnimationNodeOneShot.OneShotRequest

ValueDescription
Abort = 2

The request to stop the animation connected to "shot" port.

FadeOut = 3

The request to fade out the animation connected to "shot" port.

Fire = 1

The request to play the animation connected to "shot" port.

None = 0

The default state of the request. Nothing is done.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.