VrmapLoadingWorldPanel.cs

The VrmapLoadingWorldPanel component manages the world loading screen state. It provides a static singleton access point to this component instance.

using Sandbox;

public sealed class VrmapLoadingWorldPanel : Component
{
	public static VrmapLoadingWorldPanel Instance { get; private set; }

	[RequireComponent] public MapLoadingScreen MapLoadingScreen { get; private set; }
	
	protected override void OnStart()
	{
		Instance = this;
	}

	protected override void OnDestroy()
	{
		if ( Instance == this )
			Instance = null;
	}
}