Skip to content

C# API

The runtime player is:

SkywardGames.AnimationMontages.AnimationMontagePlayer
Member Signature or type Purpose
Play() void Play(AnimationMontage montage) Start the specified Montage.
Stop() void Stop(float blendOutDuration) Stop with a custom blend-out duration.
Cancel() void Cancel() Halt playback without the normal blend-out.
JumpToSection() void JumpToSection(string name) Move to a named Section.
IsPlaying bool Whether playback is active.
Progress float from 0.0 to 1.0 Current normalized playhead.
Speed float Read or change the playback multiplier.

The timeline guide also refers to:

bool active = player.IsWindowActive("Window.ID");
using UnityEngine;
using SkywardGames.AnimationMontages;
public sealed class PotionDrinkController : MonoBehaviour
{
[Header("Components")]
[SerializeField] private AnimationMontagePlayer player;
[SerializeField] private AnimationMontage potionDrinkMontage;
[Header("VFX")]
[SerializeField] private ParticleSystem potionLiquidVFX;
private void OnEnable()
{
if (player == null) return;
// Subscribe to Timeline Events
player.OnNotificationFired += HandleNotification;
player.OnWindowOpened += HandleWindowOpen;
player.OnWindowClosed += HandleWindowClose;
}
private void OnDisable()
{
if (player == null) return;
player.OnNotificationFired -= HandleNotification;
player.OnWindowOpened -= HandleWindowOpen;
player.OnWindowClosed -= HandleWindowClose;
}
public void DrinkPotion()
{
if (player == null || potionDrinkMontage == null) return;
// Initiate potion consumption
player.Play(potionDrinkMontage);
}
private void HandleNotification(string notifyId)
{
if (notifyId == "SFX.CorkPop")
{
// Spawn sound popup
PlayCorkSound();
}
else if (notifyId == "VFX.Liquid")
{
// Play drinking splash particles
if (potionLiquidVFX != null) potionLiquidVFX.Play();
}
}
private void HandleWindowOpen(string windowId)
{
if (windowId == "Buff.ApplyWindow")
{
// Activate status boost
ApplyCharacterStatsBuff();
}
}
private void HandleWindowClose(string windowId)
{
if (windowId == "Buff.ApplyWindow")
{
// Log status lock
LockStatusChanges();
}
}
private void PlayCorkSound() { /* Implementation */ }
private void ApplyCharacterStatsBuff() { /* Implementation */ }
private void LockStatusChanges() { /* Implementation */ }
}

The example intentionally remains source-faithful. In particular, its callback names and signatures have not been modernized or inferred.

Before shipping code based on this page, verify:

  • the namespace and assembly name;
  • AnimationMontagePlayer and AnimationMontage type names;
  • event names and delegate signatures;
  • Stop and Cancel semantics;
  • whether Speed is writable;
  • Section lookup and missing-name behavior; and
  • Window ID matching and allocation behavior.