using System; using System.Runtime.CompilerServices; using UnityEngine; [assembly: InternalsVisibleTo("UniWebView.InputSystem")] internal static class UniWebViewBackButton { internal static Func NewInputWasPressed; internal static bool WasPressed() { #if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER return NewInputWasPressed != null && NewInputWasPressed(); #else // Preserve UniWebView's legacy input preference when Both is selected. return Input.GetKeyUp(KeyCode.Escape); #endif } }