Skip to content

feat(sdk): add BasisParameterDriver for declarative animator parameter control#701

Open
towneh wants to merge 1 commit intoBasisVR:developerfrom
towneh:developer
Open

feat(sdk): add BasisParameterDriver for declarative animator parameter control#701
towneh wants to merge 1 commit intoBasisVR:developerfrom
towneh:developer

Conversation

@towneh
Copy link
Copy Markdown
Collaborator

@towneh towneh commented Mar 28, 2026

Summary

  • Adds BasisParameterDriver, a StateMachineBehaviour that executes
    parameter operations (Set, Add, Random, Copy) on animator state entry.

  • Adds BasisParameterDriverEditor, a custom inspector providing a
    card-based UI for managing operations with foldouts, reordering, and
    per-type field layouts.

Motivation

Currently there is no SDK-level way for creators to declaratively modify
animator parameters in response to state transitions. Creators either
need to write custom MonoBehaviours or rely on complex animator setups
to achieve common patterns like:

  • Setting a parameter to a fixed value on state entry
  • Accumulating a value over repeated transitions (Add)
  • Randomising int/float/bool parameters with configurable ranges and
    repeat prevention
  • Copying one parameter to another with optional range remapping

BasisParameterDriver covers all of these as a drop-in
StateMachineBehaviour.

What's included

File Purpose
BasisParameterDriver.cs Runtime behaviour — data model, execution logic, type-safe read/write helpers
BasisParameterDriverEditor.cs Custom inspector — operation list UI with add/remove/reorder

Operation types

Type Description
Set Write a constant value to the destination parameter
Add Read current value, add a delta, write back
Random Roll a random float/int/bool with min/max, chance, and repeat prevention
Copy Read from a source parameter and write to destination, with optional range remapping

Adds a new SDK component that allows avatar creators to drive animator
parameters via state machine transitions, supporting Set, Add, Random,
and Copy operations with optional range remapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant