Exemplo 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);
                }
            }
        }