Skip to content
CVL COREUnity SDK : Zero-Allocation Client

10-Minute Quickstart & Visual Walkthrough (Unity SDK)

[QUICKSTART // 10-MINUTE PIPELINE] Local Authoritative Server Ignition & Zero-GC Unity Scene Setup

This walkthrough takes a fresh Unity project from package import to a live, 30Hz authoritative spatial simulation on 127.0.0.1:55555 in under ten minutes. Following this sequence hydrates your Single Source of Truth (SSOT) configuration, launches the headless spatial micro-kernel directly from the Unity Editor, and verifies 0 B/frame managed garbage collection under a 400-entity synthetic swarm load.


[SEC 01.0] Prerequisites & SDK Package Import

Section titled “[SEC 01.0] Prerequisites & SDK Package Import”

Before importing the SDK, ensure your workstation satisfies the baseline runtime and editor requirements:

[PREREQUISITES] Workstation & Editor Requirements
Section titled “[PREREQUISITES] Workstation & Editor Requirements”
  • Unity Editor: Unity 2022.3 LTS or newer (configured with .NET Standard 2.1 API compatibility for Span<T> and MemoryMarshal support).
  • Server Runtime: Local headless spatial micro-kernel bundle (01_CVL_CORE_Engine root directory) extracted on your workstation.
  • Pre-Alpha Evaluation Bounds: Evaluation builds bind strictly to local loopback interfaces (127.0.0.1 / localhost) and enforce a hard admission ceiling of MAX_DEMO_CAP_EIDS = 400 concurrent entities.
[IMPORT] Importing cvlcore-sdk-alpha.unitypackage
Section titled “[IMPORT] Importing cvlcore-sdk-alpha.unitypackage”
  1. Open your Unity project and navigate to Assets > Import Package > Custom Package…
  2. Select cvlcore-sdk-alpha.unitypackage and click Import to unpack the SDK into Assets/.
  3. Verify that two cleanly segregated root folders appear in your Project window:
Project Structure: Two-Folder Physical Segregation & The Delete Test
Assets/
├── CVL_CORE_SDK/ # Core Zero-Allocation Runtime (CVLCore.SDK Namespace)
│ ├── API/ # CVLEngineAPI.cs (Static Event Delegation Broker)
│ ├── Configuration/ # CVLEngineConfig.cs (Mirrored SSOT ScriptableObject)
│ ├── Core/ # CVLScreenSpaceUIManager.cs & CVLClientProfilerReport.cs
│ ├── Editor/ # CVLSetupWizard.cs & CVLPrefabValidator.cs
│ ├── Entities/ # CVLPlayerController.cs & CVLNetworkIdentity.cs
│ └── Network/ # CVLNetworkManager.cs & ProtocolConstants.cs
│
└── CVL_Demo_Environment/ # Optional Reference Scene, HUD & Spectator Camera
├── Scenes/ # Turnkey 512m x 512m Evaluation Testbed Scene
└── Scripts/ # DemoEnvironmentBridge.cs, CVLDemoHUD.cs, SpectatorCamera.cs

The Delete Test Invariant: Assets/CVL_CORE_SDK/ has zero dependencies on Assets/CVL_Demo_Environment/. Once you finish evaluating the reference scene, you can delete Assets/CVL_Demo_Environment/ in its entirety without triggering a single compiler warning or missing reference.


[SEC 02.0] Step 1: Hydrate & Ignite the Local Server (CVL Setup Wizard)

Section titled “[SEC 02.0] Step 1: Hydrate & Ignite the Local Server (CVL Setup Wizard)”

Rather than manually editing JSON files or duplicating speed constants across C# scripts, use the CVL Setup Wizard to synchronize your configuration and boot the server in one click.

[WIZARD] Configuring & Launching from the Editor Cockpit
Section titled “[WIZARD] Configuring & Launching from the Editor Cockpit”
  1. In the Unity top menu bar, open CVL CORE > Setup Wizard.
  2. Under File Bindings, confirm that Unity Config Asset points to CVLEngineConfig and Server JSON Path points to config/cvlcore_engine_config.json inside your 01_CVL_CORE_Engine root folder.
  3. Under Network Telemetry Profile, select MMO High Density Persistent (Active) and verify that Collision Cell Size is set to a valid power of two between 4.0m and 64.0m (default: 16).
  4. Click Save and Launch Local Server. The wizard validates all prefab bounding radii, writes cvlcore_engine_config.json, updates CVLEngineConfig.asset, and spawns the headless server bound to 127.0.0.1:55555 (wire transport) and 127.0.0.1:55556 (1.0Hz admin telemetry).
[EDITOR COCKPIT // SSOT] CVL CORE Setup Wizard & Mirrored ScriptableObject Inspector
CVL CORE Setup Wizard Master Configuration Cockpit in Unity Editor
CVLEngineConfig ScriptableObject showing mirrored Server SSOT fields

FIGURE 1.0 // Left: The Unity Editor Setup Wizard (CVL CORE > Setup Wizard) governing operational profiles, kinematic ceilings, and local server ignition. Right: The auto-hydrated CVLEngineConfig ScriptableObject mirroring server SSOT invariants for zero-allocation runtime access.


[SEC 03.0] Step 2: Scene Assembly & Connection Bootstrap

Section titled “[SEC 03.0] Step 2: Scene Assembly & Connection Bootstrap”

To test immediately, open the pre-wired evaluation scene inside Assets/CVL_Demo_Environment/Scenes/ and press Play. If you are wiring a brand-new Unity scene from scratch, complete these four steps:

  1. Add CVLNetworkManager: Create an empty GameObject named [CVL_NetworkManager], attach CVLNetworkManager, and assign your hydrated CVLEngineConfig asset.
  2. Add CVLScreenSpaceUIManager: Create a Canvas set to Screen Space - Overlay, strip its GraphicRaycaster component, attach CVLScreenSpaceUIManager, and assign your pooled nameplate prefab.
  3. Align the 512m x 512m Terrain Floor: Create an invisible physics floor (BoxCollider centered at (256.0, -0.5, 744.0) with scale (512.0, 1.0, 512.0)) paired with an uncollided visual Plane at (256.0, 0.0, 744.0) scaled to (51.2, 1.0, 51.2) so client ground elevation matches the server’s Z-axis baseline.
  4. Ignite the Transport Socket: CVLNetworkManager uses lazy-connect initialization so Awake() and Start() remain socket-free. Trigger the connection handshake from your game bootstrapper via IgniteBootSequence():
Assets/Scripts/QuickstartBootstrapper.cs
using UnityEngine;
using CVLCore.SDK;
public class QuickstartBootstrapper : MonoBehaviour
{
private void OnEnable()
{
CVLEngineAPI.OnNetworkStateChanged += HandleNetworkStateChanged;
CVLEngineAPI.OnEntitySpawned += HandleEntitySpawned;
}
private void OnDisable()
{
CVLEngineAPI.OnNetworkStateChanged -= HandleNetworkStateChanged;
CVLEngineAPI.OnEntitySpawned -= HandleEntitySpawned;
}
private void Start()
{
// Initiates Phase 1 TCP handshake, CRC32 protocol check, and bundle hydration
CVLNetworkManager.Instance.IgniteBootSequence();
}
private void HandleNetworkStateChanged(EngineConnectionState state, string detail)
{
if (state == EngineConnectionState.ActiveGameplay)
{
Debug.Log("[CVL CORE] Connected to 30Hz authoritative micro-kernel on 127.0.0.1:55555.");
}
}
private void HandleEntitySpawned(string eid, GameObject proxy, bool isLocal)
{
if (isLocal)
{
Debug.Log($"[CVL CORE] Local operator spawned with permanent EID: {eid}");
}
}
}

[SEC 04.0] Step 3: Press Play & Verify Loopback Handshake

Section titled “[SEC 04.0] Step 3: Press Play & Verify Loopback Handshake”

With the local server running in the background and your scene wired, press Play in the Unity Editor to verify end-to-end connection admission:

[VERIFICATION] Confirming Active Gameplay & Loopback Telemetry
Section titled “[VERIFICATION] Confirming Active Gameplay & Loopback Telemetry”
  1. Verify Server Admission: Check the local server terminal window spawned by the Setup Wizard. You should see the Phase 1 TCP handshake complete, the compile-time IEEE 802.3 CRC32 protocol signature pass parity validation, and your local entity assigned NetID 1.
  2. Confirm Scene Hydration: In the Unity Game viewport, your local operator prefab spawns onto the 512m x 512m terrain plane at the authoritative server coordinates, and CVLEngineAPI.OnNetworkStateChanged transitions to EngineConnectionState.ActiveGameplay.
  3. Test Movement & Free-Fly Camera (C Key): Move your avatar with WASD to confirm 30Hz fixed-step OP_TELEMETRY transmission, or press C to detach SpectatorCamera into free-fly mode (which automatically sets CVLEngineAPI.IsInputSuspended = true so your avatar maintains its 30Hz keepalive heartbeat without triggering a 10.0s flatline timeout).
[PLAY MODE // VERIFIED] Live Loopback Session & 30Hz Telemetry Handshake
Unity Editor Play Mode showing active loopback connection to CVL CORE server on 127.0.0.1:55555

FIGURE 2.0 // Unity Editor running in Play Mode connected to the local spatial micro-kernel (127.0.0.1:55555), confirming ActiveGameplay state promotion, local EID hydration, and sub-millisecond loopback RTT.


[SEC 05.0] Architectural Invariants & Onboarding Guardrails

Section titled “[SEC 05.0] Architectural Invariants & Onboarding Guardrails”
[CHECKLIST // ONBOARDING] FIRST-RUN CONNECTION & PREFAB GUARDRAILS

1. Re-Export on Config Edits (CRC32 Parity Lock): Whenever you modify spatial or kinematic values in the Setup Wizard, click Save Configuration to Server JSON before restarting the server so the client's compile-time CRC32 protocol signature matches the server binary.
2. Remote Proxy PhysX Stripping: Never attach active Rigidbody or non-trigger Collider components to pooled remote proxy prefabs; local PhysX simulation on remote entities will fight the 133ms interpolation buffer.
3. Pre-Alpha Loopback & Cap Enforcement: Evaluation servers reject external WAN connections and cap total active entities at MAX_DEMO_CAP_EIDS = 400.


[SEC 06.0] Next Steps & Subsystem Deep Dives

Section titled “[SEC 06.0] Next Steps & Subsystem Deep Dives”