WuhuIslandTesting/Library/PackageCache/com.unity.xr.management@4.2.1/Tests/StandaloneSubsystem/StandaloneSubsystem.cs
2025-01-07 02:06:59 +01:00

42 lines
933 B
C#

using System;
namespace UnityEngine.XR.Management.Tests.Standalone
{
public class StandaloneSubsystem : Subsystem
{
private bool isRunning = false;
public override bool running
{
get
{
return isRunning;
}
}
public event Action startCalled;
public event Action stopCalled;
public event Action destroyCalled;
public override void Start()
{
isRunning = true;
if (startCalled != null)
startCalled.Invoke();
}
public override void Stop()
{
isRunning = false;
if (stopCalled != null)
stopCalled.Invoke();
}
protected override void OnDestroy()
{
isRunning = false;
if (destroyCalled != null)
destroyCalled.Invoke();
}
}
}