using Unity.Entities; using Unity.NetCode; using UnityEngine.Scripting; namespace ProjectM.Simulation { /// /// Custom Netcode for Entities bootstrap. Subclassing /// 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. /// [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; } } }