2022-10-03 02:04:54 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System;
|
|
|
|
using UnityEngine;
|
|
|
|
using TMPro;
|
|
|
|
using WindowsInput.Native;
|
|
|
|
|
|
|
|
public class KeyDropdownManager : MonoBehaviour
|
|
|
|
{
|
|
|
|
TMP_Dropdown Dropdown;
|
2022-10-06 23:50:57 +02:00
|
|
|
void Awake()
|
2022-10-03 02:04:54 +02:00
|
|
|
{
|
|
|
|
Dropdown = GetComponent<TMP_Dropdown>();
|
|
|
|
PopulateList();
|
|
|
|
}
|
|
|
|
void PopulateList()
|
|
|
|
{
|
|
|
|
string[] enumNames = Enum.GetNames(typeof(VirtualKeyCode));
|
|
|
|
List<string> keyNames = new List<string>(enumNames);
|
|
|
|
Dropdown.AddOptions(keyNames);
|
|
|
|
}
|
|
|
|
}
|