上传YomovSDK

This commit is contained in:
Sora丶kong
2026-03-03 03:15:46 +08:00
parent 9096da7e6c
commit eb97f31065
6477 changed files with 1932208 additions and 3 deletions

View File

@@ -0,0 +1,39 @@
// Copyright HTC Corporation All Rights Reserved.
using System.Collections.Generic;
using UnityEngine;
namespace VIVE.OpenXR.Raycast
{
public static class CanvasProvider
{
const string LOG_TAG = "VIVE.OpenXR.Raycast.CanvasProvider";
private static void DEBUG(string msg) { Debug.Log(LOG_TAG + " " + msg); }
private static List<Canvas> s_TargetCanvases = new List<Canvas>();
public static bool RegisterTargetCanvas(Canvas canvas)
{
if (canvas != null && !s_TargetCanvases.Contains(canvas))
{
DEBUG("RegisterTargetCanvas() " + canvas.gameObject.name);
s_TargetCanvases.Add(canvas);
return true;
}
return false;
}
public static bool RemoveTargetCanvas(Canvas canvas)
{
if (canvas != null && s_TargetCanvases.Contains(canvas))
{
DEBUG("RemoveTargetCanvas() " + canvas.gameObject.name);
s_TargetCanvases.Remove(canvas);
return true;
}
return false;
}
public static Canvas[] GetTargetCanvas() { return s_TargetCanvases.ToArray(); }
}
}