19 lines
528 B
C#
19 lines
528 B
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using TMPro;
|
||
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.UI;
|
||
|
|
|
||
|
|
public class DeviceUI : MonoBehaviour
|
||
|
|
{
|
||
|
|
public TextMeshProUGUI deviceNameText;
|
||
|
|
public TextMeshProUGUI deviceAddressText;
|
||
|
|
public TextMeshProUGUI deviceRssiText;
|
||
|
|
public void Init(BluetoothDevice bluetoothDevice)
|
||
|
|
{
|
||
|
|
deviceNameText.text = bluetoothDevice.Name;
|
||
|
|
deviceAddressText.text = bluetoothDevice.Address;
|
||
|
|
deviceRssiText.text = bluetoothDevice.Rssi.ToString();
|
||
|
|
}
|
||
|
|
}
|