Animation
Engine-side registry of feedback and particle ids plus bus requests for playback. Unity UnityAnimationAdapter registers ids and listens for events.
Adapter: UnityAnimationAdapter.
State
Mostly in-memory lists (_registeredIds, _registeredParticleIds); not a large Persistent subtree for the registry.
How it looks in persistent.json
There is no standard registry subtree in persistent.json for this service — ids are registered at runtime (RegisterFeedbackIds, particle pools, …). Effects are driven by CallService and bus events consumed by UnityAnimationAdapter.
Events
Particle-related string ids are in GnosisAnimationEvents (Runtime/GnosisEngine/Source/Services/Persistent/Services/Animation/). Feedback uses a literal id in GnosisAnimationService.
| Event id | Role |
|---|---|
REQUEST_FEEDBACK_PLAY | Adapter plays registered feedback |
REQUEST_PARTICLE_INSTANTIATE | Spawn / pool particle instance |
REQUEST_PARTICLE_CONTROL | Play, Stop, Pause, Emit, Reset, … (see function descriptors) |
Payload keys such as id, action, emitCount, moveToPosition, activateGameObject are PAYLOAD_* on GnosisAnimationEvents where applicable.
Functions (summary)
| Function | Role |
|---|---|
RegisterFeedbackIds | { ids: [string] } replaces registered feedback set |
GetRegisteredFeedbackIds | Ok (inspect via adapter/C# in practice) |
HasFeedback | feedbackId |
PlayFeedback | id, optional transform / transformFromStorePath / sourceId |
InstantiateParticle | Rich JSON: id, registry/inline recipe, transform options, matchAnchorRotation / matchAnchorScale, … |
ControlParticle | id, action, optional emitCount, position, … |
HasParticle | particleId |
Full parameter semantics are in GnosisFunctionDescriptor strings in GnosisAnimationService.cs.
Usage example — PlayFeedback
private void PlayHitFeedback()
{
if (Context?.Store == null || Context.CallService == null)
return;
var args = GnosisNode.CreateObject(Context.Store);
args.Set("id", "player_hit_feedback");
CallService("Animation", "PlayFeedback", args);
}Statistics
None.