1
0
mirror of synced 2024-12-18 09:15:54 +01:00
WACVR/Assets/Script/Essential/KeyDropdownManager.cs

23 lines
519 B
C#
Raw Normal View History

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