← Back to Stride · project planning pack

Skill · Version 1.0.0

Unity Jobs and Burst optimization

Moves suitable Unity computations into Jobs and Burst after profiling proves a CPU bottleneck. Defines data ownership and dependencies so parallel work remains correct and worth its scheduling cost.

unity-jobs-burst-optimization

Agents using this skill

See how it helps

When is it useful?

Use it when large computations can leave the main thread and their synchronization and memory lifetime can be defined safely.

What does it help you do?

  • Profiles a CPU bottleneck before selecting parallel computation.
  • Defines NativeContainer ownership, access and job dependencies.
  • Measures scheduling overhead and completes work before memory disposal.

Try asking this

A Unity crowd spends too much CPU time evaluating nearby targets. Compare the existing calculation with a scoped Burst job on the same crowd and hardware. Keep native buffers alive until all dependent work finishes, verify identical decisions and report total frame-time improvement including scheduling and synchronization overhead.

Detailed documentation

Read the skill’s original instructions, examples and checks in their authored language.

Details…Show less

Jobs, Burst and Data Layout

Inspect installed Burst/Collections/Entities versions, target backend and a measured CPU workload. Jobs, Burst and Entities are separate choices; do not migrate the whole project to DOTS for a local hot loop.

  • Identify data ownership, dependencies and the computation that can safely run away from Unity's main-thread object APIs. Keep unsupported managed references and APIs out of job code.
  • Prefer reducing work and improving contiguous access before parallelizing. Choose data layout from access patterns and measure cache behavior, scheduling and synchronization overhead.
  • Declare job dependencies and NativeContainer access correctly. Do not disable safety restrictions merely to suppress a conflict; resolve the actual ownership/race contract.
  • Choose allocators and disposal by lifetime, including cancellation, scene unload and exception paths. Complete outstanding work before disposing memory it uses.
  • Preserve numeric and gameplay requirements when changing vectorization, floating-point settings or parallel reduction order. A fixed random seed alone does not establish cross-platform determinism.
  • Compare a sufficiently large representative workload; small jobs and immediate Complete calls can add overhead without useful concurrency.

Verify outputs against the existing implementation, dependency/lifetime behavior and target-player timing when tooling permits. Report package/backend constraints and what remained on the main thread.

References: installed C# Job System and Burst documentation.

Included files 2

  • LICENSE.txt
  • SKILL.md