OpCenterTest.cs 652 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Runtime.InteropServices;
  5. using UnityEngine;
  6. using Ximmerse.XR;
  7. public class OpCenterTest : MonoBehaviour
  8. {
  9. private void Awake()
  10. {
  11. XDevicePlugin.OpcInit("ABC");
  12. Debug.Log("OpServiceVersionCode:"+ XDevicePlugin.GetOpServiceVersionCode());
  13. }
  14. private void Start()
  15. {
  16. XDevicePlugin.OnMissionBegin();
  17. }
  18. private void OnApplicationQuit()
  19. {
  20. XDevicePlugin.OpcExit();
  21. }
  22. private void Update()
  23. {
  24. Debug.Log("Server ip:" + XDevicePlugin.GetBoundGameServerAddress());
  25. }
  26. }