public override void OnInspectorGUI() { DrawDefaultInspector(); ControllerSelectManager myScript = (ControllerSelectManager)target; if (GUILayout.Button("add new keyboard player")) { myScript.SpawnPlayer(MappedInput.InputDevices[2]); } }
private void Awake() { if (_instance) { Destroy(gameObject); return; } _instance = this; FindObjectsOfType <PlayerController>().ToList().ForEach(x => { if (x.InputDevice) { _usedDevices.Add(x.InputDevice); } }); }