// UITK TreeView is not supported in earlier versions // Therefore the UITK version of the InputActionAsset Editor is not available on earlier Editor versions either. #if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS using CmdEvents = UnityEngine.InputSystem.Editor.InputActionsEditorConstants.CommandEvents; using System; using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEngine.InputSystem.Layouts; using UnityEngine.InputSystem.Utilities; using UnityEngine.UIElements; namespace UnityEngine.InputSystem.Editor { /// /// A view for displaying the actions of the selected action map in a tree with bindings /// as children. /// internal class ActionsTreeView : ViewBase { private readonly ListView m_ActionMapsListView; private readonly TreeView m_ActionsTreeView; private readonly Button m_AddActionButton; private readonly ScrollView m_PropertiesScrollview; private bool m_RenameOnActionAdded; private readonly CollectionViewSelectionChangeFilter m_ActionsTreeViewSelectionChangeFilter; //save TreeView element id's of individual input actions and bindings to ensure saving of expanded state private Dictionary m_GuidToTreeViewId; public ActionsTreeView(VisualElement root, StateContainer stateContainer) : base(root, stateContainer) { m_ActionMapsListView = root.Q("action-maps-list-view"); m_AddActionButton = root.Q