Creature Kit v1.1 Procedural Creature Creation for Unity
Search Results for

    Show / Hide Table of Contents
    Documentation
    Home Animation Channels Guide Clips Guide No-Code Guide API Reference

    Runtime Integration

    This page describes the boundary between Creature Kit Beast animation and application-side Unity code.

    Assemblies

    For normal gameplay code, use:

    using CreatureKit.Beasts.Animation;
    

    The public Beast animation surface is split across these runtime assemblies:

    Assembly Role
    CreatureKit.Core.Runtime Shared Creature Kit runtime types, including reusable animation math and IK helpers.
    CreatureKit.Beasts.Runtime Beast generation, generated rig access, rebuild events.
    CreatureKit.Beasts.Animation.Runtime Beast-specific animation components, clips, channels, and settings.

    Application code should normally interact with BeastAnimator and BeastAnimationBridge, not with generated child transforms directly.

    Component Setup

    Add BeastAnimator to the Beast GameObject, or assign its target Beast in the inspector.

    using CreatureKit.Beasts.Animation;
    using UnityEngine;
    
    public sealed class BeastMoveExample : MonoBehaviour
    {
        [SerializeField] private BeastAnimator beastAnimator;
    
        private void Awake()
        {
            if (beastAnimator == null)
                beastAnimator = GetComponent<BeastAnimator>();
        }
    
        private void OnEnable()
        {
            beastAnimator.PlayIdle();
        }
    }
    

    Use BeastAnimationBridge when Unity Animation Clips, Timeline, Unity Events, or Visual Scripting should drive Beast animation without custom C# gameplay code.

    Movement And Clips

    Walk, Rush, and Search Run are in-place animation clips. They animate the Beast rig, but they do not move the root GameObject through the world.

    Your controller, AI agent, navigation system, or physics system remains responsible for world movement. The usual pattern is:

    if (movingFast)
    {
        beastAnimator.PlayRush();
        beastAnimator.SetRushSpeed(speedMultiplier);
    }
    else if (searchingFast)
    {
        beastAnimator.PlaySearchRun();
        beastAnimator.SetSearchRunSpeed(speedMultiplier);
    }
    else if (moving)
    {
        beastAnimator.PlayWalk();
        beastAnimator.SetWalkSpeed(speedMultiplier);
    }
    else
    {
        beastAnimator.PlayIdle();
    }
    

    This keeps Creature Kit independent from any specific movement stack.

    Generated Rig Rebinding

    BeastAnimator binds to the generated Beast rig through BeastStructure. If the Beast is rebuilt, the animator can rebind to the new generated structure.

    Advanced integrations can listen to the Beast rebuild events:

    beast.RigRebuilt += OnRigRebuilt;
    beast.RigCleared += OnRigCleared;
    

    Most gameplay controllers do not need these events. They are useful for tools, custom inspectors, or systems that cache generated rig references.

    Editor Preview

    BeastAnimator can preview animation outside Play Mode.

    In the inspector:

    1. Enable Preview In Editor.
    2. Select the initial clip from the Initial checkbox in the matching clip foldout header, or select None.
    3. Adjust clip settings.
    4. Disable Preview In Editor to return to the rest pose.

    Editor preview is for authoring. Runtime gameplay should use Play, the named Play... clip methods, Stop, channel methods, pose methods, and the settings API.

    Optional Ground Alignment

    Ground alignment is optional and remains separate from Beast animation. Projects that use Unity's CharacterController can fit the collision capsule, project movement along slopes, and incline the generated Beast visual root with BeastCharacterGroundAlignment.

    See Beast Ground Alignment for concepts, setup, runtime usage, debugging, examples, and the generated API reference.

    Demo Helpers

    Demo controllers and camera helpers are application-side examples. They are not required Creature Kit runtime systems.

    For example:

    • a game can replace CharacterController movement with its own controller, AI, navigation, or physics stack;
    • BeastCharacterGroundAlignment is optional and scene-specific;
    • camera orbit and group framing are demo conveniences, not Beast animation features.

    You can reuse or adapt demo scripts freely, but their inspector parameters should not be treated as Creature Kit Beast structure or animation settings.

    Back to top Generated by DocFX