Esempio n. 1
0
        void BuildRebindElements()
        {
            ControlScheme controlScheme = CustomInput.GetControlScheme(m_controlSchemeName);

            for (int i = 0; i < controlScheme.Actions.Count; i++)
            {
                InputBinding binding = controlScheme.Actions[i].GetBinding(bindingIndex);

                if (binding.rebindable || binding.invertEditable || binding.sensitivityEditable)
                {
                    GameObject newRebindElement = Instantiate(rebindElement);
                    newRebindElement.transform.SetParent(rebindParent);

                    RebindInputButton rebinder = newRebindElement.GetComponent <RebindInputButton>();
                    rebinder.Initialize(binding, controlScheme.Actions[i], normalProfile, scanningProfile);
                    rebinders.Add(rebinder);
                }
            }
        }
        void BuildRebindElements()
        {
            ControlScheme controlScheme = InputManager.GetControlScheme(m_controlSchemeName);

            for (int i = 0; i < controlScheme.Actions.Count; i++)
            {
                if (controlScheme.Actions[i].rebindable)
                {
                    GameObject newRebindElement = Instantiate(rebindElement);
                    newRebindElement.transform.SetParent(rebindParent);

                    RebindInputButton rebinder = newRebindElement.GetComponent <RebindInputButton>();
                    rebinder.actionName = controlScheme.Actions[i].Name;

                    rebinder.m_controlSchemeName = m_controlSchemeName;
                    rebinder.normalProfile       = normalProfile;
                    rebinder.scanningProfile     = scanningProfile;

                    rebinder.Initialize();
                }
            }
        }