rabidus-test/Assets/BNG Framework/Scripts/UI/VRCanvas.cs

21 lines
496 B
C#
Raw Permalink Normal View History

2023-07-24 16:38:13 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace BNG {
/// <summary>
/// Add this Component to any Canvas to make sure it can be interacted with in World Space
/// </summary>
[RequireComponent(typeof(GraphicRaycaster))]
[RequireComponent(typeof(Canvas))]
public class VRCanvas : MonoBehaviour {
void Start() {
VRUISystem.Instance.AddCanvas(GetComponent<Canvas>());
}
}
}