Set up DOTS + Netcode for Entities foundation
One-time stack setup per Docs/dots-setup-task.md (Unity 6.4.7 / 6000.4.7f1).
Packages: entities 6.4.0, entities.graphics 6.4.0, netcode 1.13.2, physics 1.4.6.
- Assets/_Project asmdef split: ProjectM.Simulation/Client/Server/Authoring (root ns ProjectM)
- GameBootstrap : ClientServerBootstrap; verified separate client + server worlds in Play Mode
- Gameplay subscene wired into SampleScene as a baking target
- Heartbeat component + Burst ISystem; EditMode smoke test green (1/1)
- In-repo Obsidian vault (Docs/Vault) incl. DR-001 (plain-Entities test over internal NetCodeTestWorld)
- Portable .mcp.json (basic-memory + serena via ${CLAUDE_PROJECT_DIR}); CLAUDE.md conventions
- .gitignore for DOTS baking cache + machine-local config
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
id: DR-001
|
||||
title: Netcode smoke/test harness approach
|
||||
status: accepted
|
||||
date: 2026-05-29
|
||||
tags:
|
||||
- decision
|
||||
- netcode
|
||||
- testing
|
||||
permalink: gamevault/07-sessions/decisions/dr-001-netcode-test-harness
|
||||
---
|
||||
|
||||
# DR-001 — Test harness: plain-Entities over internal NetCodeTestWorld
|
||||
|
||||
## Context
|
||||
|
||||
Setup (`Docs/dots-setup-task.md` §4) called for a `NetCodeTestWorld` EditMode test. In **Netcode for Entities 1.13.2**, `Unity.NetCode.Tests.NetCodeTestWorld` (assembly `Unity.NetCode.TestsUtils.Runtime.Tests`) is **`internal`**, reachable only via a fixed `[InternalsVisibleTo]` allow-list of Unity's own assemblies. A consumer test can use it only by naming its test assembly to match an entry (e.g. `Unity.NetcodeSamples.EditModeTests`) — effectively impersonating a Unity sample assembly. Research (Unity ECS status, Dec 2025) shows no public consumer test harness on the roadmap, and that this is **unchanged by a Unity 6.6 upgrade** (Netcode stays independent 1.x; only Entities/Collections/Graphics renumber to the Editor version).
|
||||
|
||||
## Decision
|
||||
|
||||
Use a **plain-Entities EditMode test** as the default test pattern: create a `World`, register the system under test in `SimulationSystemGroup`, tick, assert. Public API only, no assembly-name impersonation, version-independent. Netcode **world boot** is verified separately by the §3 Play Mode check (`GameBootstrap` creates `ServerWorld` + `ClientWorld`).
|
||||
|
||||
## Consequences
|
||||
|
||||
- Clean, always-green tests with no fragile naming hacks.
|
||||
- Full client+server **connect+tick** coverage is not provided by this pattern. When needed (ghost/prediction work), revisit per-system: either name a dedicated test asmdef `Unity.NetcodeSamples.EditModeTests` to borrow the IVT grant, or vendor a copy of the netcode test utilities.
|
||||
Reference in New Issue
Block a user