using AxibugEmuOnline.Client.InputDevices; using UnityEngine; using UnityEngine.UI; namespace AxibugEmuOnline.Client.UI { /// /// 设备信息条 ItemUI /// public class DevicesInfoItem : MonoBehaviour { [SerializeField] Image UI_Icon; public InputDevice_D Datacontext { get; private set; } internal void SetData(InputDevice_D device) { Datacontext = device; string resourcePath = $"Icons/DevicesIcons/{device.PadType}"; UI_Icon.sprite = Resources.Load(resourcePath); } } }