Exemple #1
0
        public bool TryMap(out InputAction conflict, out IInputMap attemptedInput)
        {
            conflict = null;

            IInputMap currentInput = device.GetCurrentInput(actionToRebind.properties);

            attemptedInput = currentInput;

            if (currentInput != null)
            {
                foreach (InputAction inputAction in allActions)
                {
                    if (MSChartEditorInput.Category.interactionMatrix.TestInteractable(inputAction.properties.category, actionToRebind.properties.category) && inputAction.HasConflict(currentInput))
                    {
                        conflict = inputAction;
                        return(false);
                    }
                }

                // Do rebind and exit
                mapToRebind.SetFrom(currentInput);
                return(true);
            }

            return(false);
        }