2026-04-16 14:57:19 +08:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Kill.Bluetooth;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
namespace Kill.UI.Components
|
|
|
|
|
{
|
|
|
|
|
public class DeviceUI : MonoBehaviour
|
|
|
|
|
{
|
2026-05-11 08:39:33 +08:00
|
|
|
public Text deviceNameText;
|
|
|
|
|
public Text deviceAddressText;
|
|
|
|
|
public Text deviceRssiText;
|
2026-04-16 14:57:19 +08:00
|
|
|
public void Init(BluetoothDevice bluetoothDevice)
|
|
|
|
|
{
|
|
|
|
|
deviceNameText.text = bluetoothDevice.Name;
|
|
|
|
|
deviceAddressText.text = bluetoothDevice.Address;
|
|
|
|
|
deviceRssiText.text = bluetoothDevice.Rssi.ToString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|