using UnityEngine; namespace Northbound { public class QuickNetworkSetup : MonoBehaviour { [Header("Quick Setup Options")] [Tooltip("Create a NetworkConnectionHelper component")] [SerializeField] private bool createConnectionHelper = true; [Tooltip("Disable AutoHost to prevent auto-start")] [SerializeField] private bool disableAutoHost = true; private void Awake() { SetupScene(); } private void SetupScene() { if (createConnectionHelper) { CreateConnectionHelper(); } if (disableAutoHost) { DisableAutoHost(); } Destroy(this); } private void CreateConnectionHelper() { if (FindObjectOfType() == null) { GameObject helperObj = new GameObject("NetworkConnectionHelper"); helperObj.AddComponent(); Debug.Log("[QuickNetworkSetup] NetworkConnectionHelper created"); } } private void DisableAutoHost() { AutoHost[] autoHosts = FindObjectsByType(FindObjectsSortMode.None); foreach (var autoHost in autoHosts) { autoHost.enabled = false; Debug.Log("[QuickNetworkSetup] AutoHost disabled"); } } } }