99d8d2d2a9
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>
25 lines
876 B
C#
25 lines
876 B
C#
using Unity.Entities;
|
|
using Unity.NetCode;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace ProjectM.Simulation
|
|
{
|
|
/// <summary>
|
|
/// Custom Netcode for Entities bootstrap. Subclassing <see cref="ClientServerBootstrap"/>
|
|
/// gives an explicit hook to customize world creation, tick rate, and auto-connect.
|
|
/// For now it reproduces the default behavior: create separate client and server worlds
|
|
/// based on the Multiplayer PlayMode Tools settings, without auto-connecting.
|
|
/// </summary>
|
|
[Preserve]
|
|
public class GameBootstrap : ClientServerBootstrap
|
|
{
|
|
public override bool Initialize(string defaultWorldName)
|
|
{
|
|
// 0 = do not auto-connect; worlds are still created. Set a port later to auto-connect.
|
|
AutoConnectPort = 0;
|
|
CreateDefaultClientServerWorlds();
|
|
return true;
|
|
}
|
|
}
|
|
}
|