adf78570f8
Delete the NetConnectionUI GameObject from Game/DevSandbox/SampleScene + ConnectionUI.cs (the UITK frontend menu owns Host/Join+IP now); repoint 4 stale doc-comments (GameBootstrap done in commit C; DebugOverlay/ConnectionConfig/EditorAutoHostSystem here) to MainMenuController/WorldLauncher; remove the Assets/_Recovery crash-recovery scenes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
1.4 KiB
C#
36 lines
1.4 KiB
C#
using Unity.Collections;
|
|
using Unity.Entities;
|
|
|
|
namespace ProjectM.Simulation
|
|
{
|
|
/// <summary>
|
|
/// Connection intent for the M4 LAN host/join flow. Lives in Simulation so both the server and
|
|
/// client worlds can read it. A UI (the UITK frontend menu via <c>WorldLauncher</c>) — or, in the editor, the auto-host system —
|
|
/// writes the desired <see cref="Mode"/> + endpoint and sets <see cref="Requested"/> true; the
|
|
/// per-world ConnectionControlSystem turns it into a netcode <c>NetworkStreamRequestListen</c> /
|
|
/// <c>NetworkStreamRequestConnect</c> and clears <see cref="Requested"/>. Direct IP/LAN only for now —
|
|
/// Unity Relay is deferred to a later pass. Created per-world as a singleton.
|
|
/// </summary>
|
|
public enum ConnectionMode : byte
|
|
{
|
|
None,
|
|
Host,
|
|
Join,
|
|
}
|
|
|
|
public struct ConnectionConfig : IComponentData
|
|
{
|
|
/// <summary>What to do with this world's network stream.</summary>
|
|
public ConnectionMode Mode;
|
|
|
|
/// <summary>Dotted IPv4 to connect to (Join). Ignored for Host (binds AnyIpv4).</summary>
|
|
public FixedString64Bytes Address;
|
|
|
|
/// <summary>Listen/connect port.</summary>
|
|
public ushort Port;
|
|
|
|
/// <summary>Set true to request the control system act on Mode this frame; it clears the flag.</summary>
|
|
public bool Requested;
|
|
}
|
|
}
|