Page cover

fishRuntime Samples

Samples showcasing Flora's runtime features.

Fish Boids

The Fish Boids scene demonstrates runtime-driven instance animation at high counts using Flora + jobs.

Scene Path

Samples~/Examples/Fish/Scenes/FishBoidsSample.unity

What This Demonstrates

  • Runtime creation and ownership of many instances

  • Job-based transform simulation

  • Batch update upload into Flora runtime

APIs Exercised

  • FloraSystem.GetOrCreate()

  • CreateInstances(...)

  • ScheduleUpdateInstanceWorldTransforms(...)

  • DestroyInstances(...)

Run and Verify

  1. Open FishBoidsSample and press Play.

  2. Confirm fish schools animate continuously.

  3. Watch frame stability while instance counts are high.

Expected result: fish move smoothly as Flora instances without per-fish scene GameObjects for rendering.

Common Failure Checks

  • No fish visible: ensure Flora is active and sample objects enabled.

  • Errors on disable: verify job dependencies complete before destroy/dispose.

  • Motion vector artifacts: check runtime/scene motion-vector settings.

Core Classes

FishSchool

Last updated