# 7. DOTS Profiling, Quest and When Not to Use Part of [[DOTS]]. Previous: [[6. Bridging ECS with GameObjects UI and VFX]]. Next: [[8. DOTS Pitfalls]]. > [!note] Verification status > Entities Graphics 6.5 requirements (URP Forward+ only, Vulkan on Android, GLES 3.1 deprecated, Linear color space, SRP Batcher) come from the 6.5 docs. Quest-specific statements are **general guidance, not verified** on device or in Meta docs. **No measurements were taken**, so collect your own numbers. ## 7.1 Tools - **Window > Entities > Systems**: per-system main-thread time. Find the expensive system. - **Profiler > CPU > Timeline**: worker-thread bars show whether jobs actually run in parallel. One long bar on one worker means something is serializing the work (a single transform root, a non-parallel `Schedule()`, or a sync point). - **Burst**: profile a **development build**. In the editor, safety checks and the leak detector add overhead. Use **Jobs > Burst > Safety Checks > Off** only for a quick comparison, never as a fix. - **Sync points**: the Profiler shows `JobHandle.Complete` / `CompleteDependency` markers on the main thread. Each one is the main thread waiting. ## 7.2 Measurement plan for the swarm | Step | Change | Expectation to *check* (not a promise) | |---|---|---| | 1 | Seek-only (part 4), 10k | Movement cost scales linearly | | 2 | Add grid separation (part 5) | Grid build + query cost grows with density | | 3 | Brute-force separation (try it once!) | Explodes as N² and shows why Spatial Partition exists | | 4 | Burst off | Large slowdown in jobs | | 5 | Entities Graphics vs VFX rendering | GPU-bound vs CPU-bound tradeoff | Write the numbers into this note. That way the tutorial becomes **your** evidence ([[Level Up! (Review)]] Level 5 is about metrics, and the same discipline applies to performance). ## 7.3 Meta Quest 2 VR work in this vault targets **Unity 6.3 LTS (6000.3.27f2+)** ([[0.Choosing a Unity Version]]). Consequences: - **Entities isn't core on 6.3** (core packages start at 6.4). Install **Entities 1.x** from the Package Manager. The latest standalone release is **1.5.0** (changelog 2026-09-08). Check which version the 6.3 editor offers; that's **unverified**. - **Graphics API**: Entities Graphics on Android requires **Vulkan** (GLES 3.1 is deprecated per the 6.5 docs). Quest projects normally use Vulkan anyway. - **URP Forward+** is required for Entities Graphics in URP. Many Quest projects use plain **Forward** for performance. Test whether Forward+ fits your frame budget (72/90 Hz) on device before you commit. As a fallback, render the swarm with **VFX Graph** or `Graphics.RenderMeshInstanced` from a MonoBehaviour, and keep ECS for simulation only. - **CPU**: Quest 2's mobile CPU has few big cores. Jobs still help, but don't expect desktop scaling. Fewer, cheaper entities (2-3k) is a sensible first target, **unverified**. - **Thermals**: profile sustained 10-minute sessions, not 10 seconds. - **Comfort**: a horde rushing at a VR player is intense. Spawn rings outside the play-space boundary, and avoid enemies clipping through the player's head. See [[5.Quest 2 Performance and Rendering]] for frame-budget tooling. ## 7.4 When NOT to use DOTS | Situation | Better choice | |---|---| | Dozens of complex, unique enemies with animation, dialogue and NavMesh | GameObjects + [[Enemy AI State Machine]] + [[NavMesh in Unity 6 (AI Navigation 2.x)]] | | One hot loop (terrain gen, mesh deformation, pathfinding grid) | **Jobs + Burst only** ([[2. Jobs and Burst for GameObject Projects]]) | | Many identical *visual* effects with no gameplay | [[VFX Graph]] or [[Particle Systems and Layered Effects]] | | Teaching beginners | GameObjects first. ECS adds concepts (baking, worlds, sync points) | | You need thousands of interacting agents, bullets, or a simulation sandbox | **Entities** | The design question comes first ([[Level Up! (Review)]]): does the game *need* the horde? If the fun is in precise one-on-one combat, DOTS buys you nothing. ## Sources - Entities Graphics 6.5 requirements: https://docs.unity3d.com/Packages/[email protected]/manual/index.html - Entities 1.5 changelog: https://docs.unity3d.com/Packages/[email protected]/changelog/CHANGELOG.html - Systems window: https://docs.unity3d.com/Packages/[email protected]/manual/editor-systems-window.html - `Graphics.RenderMeshInstanced`: https://docs.unity3d.com/6000.5/Documentation/ScriptReference/Graphics.RenderMeshInstanced.html