Skip to content

Commit 51c2088

Browse files
committed
todo: implement xr input subsystem for webgl
1 parent b852b21 commit 51c2088

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Packages/webxr/Runtime/Scripts/WebXRManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public class WebXRManager : SubsystemLifecycleManager<WebXRSubsystem, WebXRSubsy
1414
{
1515
public static WebXRManager Instance { get; private set; }
1616

17+
public WebXRState XRState => subsystem.xrState;
18+
1719
public event WebXRSubsystem.XRChange OnXRChange
1820
{
1921
add => subsystem.OnXRChange += value;

Packages/webxr/Runtime/XRPlugin/WebXRSubsystem.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
namespace WebXR
77
{
8+
// TODO: we need an XRInputSubsystem implementation - this can only be done via native code
9+
810
public class WebXRSubsystemDescriptor : SubsystemDescriptor<WebXRSubsystem>
911
{
1012
}
@@ -27,7 +29,7 @@ private static void RegisterDescriptor()
2729
public override void Start()
2830
{
2931
if (running) return;
30-
Debug.Log("Hello " + nameof(WebXRSubsystem));
32+
Debug.Log("Start " + nameof(WebXRSubsystem));
3133
_running = true;
3234
Instance = this;
3335
InternalStart();
@@ -36,15 +38,15 @@ public override void Start()
3638
public override void Stop()
3739
{
3840
if (!_running) return;
39-
Debug.Log("Goodbye " + nameof(WebXRSubsystem));
41+
Debug.Log("Stop " + nameof(WebXRSubsystem));
4042
_running = false;
4143
Instance = null;
4244
}
4345

4446
protected override void OnDestroy()
4547
{
4648
if (!running) return;
47-
Debug.Log("The End of " + nameof(WebXRSubsystem));
49+
Debug.Log("Destroy " + nameof(WebXRSubsystem));
4850
_running = false;
4951
Instance = null;
5052
}

0 commit comments

Comments
 (0)