version 2.5.0

This commit is contained in:
Sean Lu
2025-01-10 17:17:03 +08:00
parent ddc3c4c6d8
commit 2372c9429a
1086 changed files with 290974 additions and 77367 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(); }
}
}