using System.Collections.Generic; using UnityEngine.InputSystem.Utilities; namespace UnityEngine.InputSystem { /// /// A collection of input actions (see ). /// /// /// public interface IInputActionCollection : IEnumerable { /// /// Optional mask applied to all bindings in the collection. /// /// /// If this is not null, only bindings that match the mask will be used. /// InputBinding? bindingMask { get; set; } ////REVIEW: should this allow restricting to a set of controls instead of confining it to just devices? /// /// Devices to use with the actions in this collection. /// /// /// If this is set, actions in the collection will exclusively bind to devices /// in the given list. For example, if two gamepads are present in the system yet /// only one gamepad is listed here, then a "<Gamepad>/leftStick" binding will /// only bind to the gamepad in the list and not to the one that is only available /// globally. /// ReadOnlyArray? devices { get; set; } /// /// List of control schemes defined for the set of actions. /// /// /// Control schemes are optional and the list may be empty. /// ReadOnlyArray controlSchemes { get; } /// /// Check whether the given action is contained in this collection. /// /// An arbitrary input action. /// True if the given action is contained in the collection, false if not. /// /// Calling this method will not allocate GC memory (unlike when iterating generically /// over the collection). Also, a collection may have a faster containment check rather than /// having to search through all its actions. /// bool Contains(InputAction action); /// /// Enable all actions in the collection. /// void Enable(); /// /// Disable all actions in the collection. /// void Disable(); } }