using System.Collections.Generic; using Unity.NetCode; namespace EE2Clone.NetCode { /// /// Custom bootstrap that prevents automatic world creation. /// We manually create client/server worlds when the player chooses to host or connect. /// [UnityEngine.Scripting.Preserve] public class GameBootstrap : ClientServerBootstrap { public override bool Initialize(string defaultWorldName) { // Create only the default (local) world on startup. // Client and server worlds are created manually when the user // starts hosting or joins a game. AutoConnectPort = 0; CreateDefaultClientServerWorlds(); return true; } } }