← Zurück zu Babylon.js · Projektplanungspaket

Skill · Version 1.0.0

Unity-Jobs- und Burst-Optimierung

Verlagert geeignete Unity-Berechnungen nach gemessenem CPU-Engpass in Jobs und Burst. Klärt Datenbesitz und Abhängigkeiten, damit Parallelisierung korrekt bleibt und ihren Verwaltungsaufwand rechtfertigt.

unity-jobs-burst-optimization

Agenten mit diesem Skill

Entdecke, wie der Skill hilft

Wann ist der Skill hilfreich?

Nutze ihn für auslagerbare große Berechnungen mit sicher definierbarer Synchronisation und Speicherlebensdauer.

Wobei hilft er dir?

  • Profiliert einen CPU-Engpass vor Wahl paralleler Berechnung.
  • Definiert NativeContainer-Verantwortung, Zugriff und Job-Abhängigkeiten.
  • Misst Planungsaufwand und beendet Arbeit vor Speicherfreigabe.

Das könntest du fragen

Eine Unity-Menge benötigt zu viel CPU für nahe Ziele. Vergleiche die bisherige Berechnung mit einem begrenzten Burst-Job bei gleicher Menge und Hardware. Erhalte native Puffer bis zum Abschluss aller abhängigen Arbeiten, prüfe identische Entscheidungen und miss die gesamte Bildzeit einschließlich Planung und Synchronisation.

Ausführliche Dokumentation

Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.

Details…Weniger anzeigen

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.

Enthaltene Dateien 2

  • LICENSE.txt
  • SKILL.md