// Copyright (c) 2015 - 2023 Doozy Entertainment. All Rights Reserved. // This code can only be used under the standard Unity Asset Store End User License Agreement // A Copy of the EULA APPENDIX 1 is available at http://unity3d.com/company/legal/as_terms using Doozy.Runtime.Common.Attributes; using Doozy.Runtime.Common.ScriptableObjects; using Doozy.Runtime.UIManager.Input; using UnityEngine; // ReSharper disable MemberCanBePrivate.Global namespace Doozy.Runtime.UIManager.ScriptableObjects { public class UIManagerInputSettings : SingletonRuntimeScriptableObject { [RestoreData(nameof(UIManagerInputSettings))] public static UIManagerInputSettings Get() => instance; #if INPUT_SYSTEM_PACKAGE public const InputHandling k_InputHandling = InputHandling.InputSystemPackage; #elif LEGACY_INPUT_MANAGER public const InputHandling k_InputHandling = InputHandling.LegacyInputManager; #else //CustomInput public const InputHandling k_InputHandling = InputHandling.CustomInput; #endif public const int k_LifeTheUniverseAndEverything = 42; public const float k_BackButtonCooldown = 0.1f; [SerializeField] private int DefaultPlayerIndex = -k_LifeTheUniverseAndEverything; /// Default player index value (used for global user) public int defaultPlayerIndex => DefaultPlayerIndex; [SerializeField] private bool MultiplayerMode; /// True if Multiplayer Mode is enabled public bool multiplayerMode { get => MultiplayerMode; set => MultiplayerMode = value; } [SerializeField] private float BackButtonCooldown = k_BackButtonCooldown; /// Cooldown after the 'Back' button was fired (to prevent spamming and accidental double execution) public float backButtonCooldown { get => BackButtonCooldown; set => BackButtonCooldown = value; } [SerializeField] private bool SubmitTriggersPointerClick = true; /// If TRUE, the ISubmitHandler will trigger the Pointer Click events public bool submitTriggersPointerClick { get => SubmitTriggersPointerClick; set => SubmitTriggersPointerClick = value; } [SerializeField] private string BackButtonVirtualButtonName = BackButton.k_BackButtonVirtualButtonName; /// Name of the virtual button that will be used for the 'Back' button, when LEGACY_INPUT_MANAGER is enabled public string backButtonVirtualButtonName { get => BackButtonVirtualButtonName; set => BackButtonVirtualButtonName = value; } } }