rabidus-test/Assets/CurvedUI/Scripts/CurvedUIEventSystem.cs

31 lines
561 B
C#
Raw Permalink Normal View History

2023-08-15 17:38:54 +03:00
using UnityEngine.EventSystems;
namespace CurvedUI
{
/// <summary>
/// Fixes the issue where UI input would stop working in VR if the game window looses focus.
/// </summary>
public class CurvedUIEventSystem : EventSystem
{
public static CurvedUIEventSystem instance;
protected override void Awake()
{
base.Awake();
instance = this;
}
protected override void OnApplicationFocus(bool hasFocus)
{
base.OnApplicationFocus(true);
}
}
}