Scope.cs

A small Component class named Scope. It hides the GameObject on proxies at start, and provides Show and Hide methods that toggle GameObject.Enabled; Show only enables when not a proxy and the game is running in VR.

using Sandbox;

public sealed class Scope : Component
{
	protected override void OnStart()
	{
		if ( IsProxy )
		{
			Hide();
		}
	}

	public void Show()
	{
		if ( !IsProxy && Game.IsRunningInVR)
		{
			GameObject.Enabled = true;
		}
	}

	public void Hide()
	{
		GameObject.Enabled = false;
	}
}