DeviceInfoView.cs 710 B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class DeviceInfoView : MonoBehaviour
  6. {
  7. [SerializeField]
  8. private TextMesh IdentifierText;
  9. [SerializeField]
  10. private TextMesh SerialText;
  11. [SerializeField]
  12. private TextMesh PhysicalText;
  13. void Start()
  14. {
  15. IdentifierText.text = "设备唯一码 Identifier " + HttpStaticMessage.GetUniqueId();
  16. SerialText.text = "设备序列号 Serial " + CStaticMethod.SerialId();
  17. PhysicalText.text = "物理地址 Physical " +System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].GetPhysicalAddress().ToString();
  18. }
  19. }