This repository has been archived on 2025-03-10. You can view files and clone it, but cannot push or open issues or pull requests.
rabidus-test/Assets/CurvedUI/Scripts/CurvedUIEventSystem.cs

31 lines
561 B
C#
Raw Normal View History

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);
}
}
}