Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        ControllerSelectManager myScript = (ControllerSelectManager)target;

        if (GUILayout.Button("add new keyboard player"))
        {
            myScript.SpawnPlayer(MappedInput.InputDevices[2]);
        }
    }
Esempio n. 2
0
    private void Awake()
    {
        if (_instance)
        {
            Destroy(gameObject);
            return;
        }

        _instance = this;

        FindObjectsOfType <PlayerController>().ToList().ForEach(x =>
        {
            if (x.InputDevice)
            {
                _usedDevices.Add(x.InputDevice);
            }
        });
    }