New mod: Vive Eye Tracking

This commit is contained in:
SDraw 2025-05-21 02:15:01 +03:00
parent de463d2236
commit a72af43f69
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
10 changed files with 432 additions and 0 deletions

15
ml_vet/Utils.cs Normal file
View file

@ -0,0 +1,15 @@
using ABI_RC.Core.Savior;
using ABI_RC.Core.UI;
using System.Reflection;
namespace ml_vet
{
public static class Utils
{
static readonly FieldInfo ms_view = typeof(CohtmlControlledViewWrapper).GetField("_view", BindingFlags.Instance | BindingFlags.NonPublic);
public static void ExecuteScript(this CohtmlControlledViewWrapper p_instance, string p_script) => (ms_view?.GetValue(p_instance) as cohtml.Net.View)?.ExecuteScript(p_script);
public static bool IsInVR() => ((MetaPort.Instance != null) && MetaPort.Instance.isUsingVr);
}
}