VufoiraImgManager.cs 803 B

12345678910111213141516171819202122232425262728
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. //using Vuforia;
  5. public class VufoiraImgManager : MonoBehaviour {
  6. [SerializeField]
  7. private VufoiraImageTarget ImagTracker;
  8. private bool isRunning = false;
  9. void Start () {
  10. //初始关闭状态
  11. MessageCenterController.Instance.Register(GameEnum.MESSAGE_SEND_CHANGE_TRACK_IMAGE, ChangeTrack);
  12. }
  13. protected void OnDestroy()
  14. {
  15. MessageCenterController.Instance.UnRegister(GameEnum.MESSAGE_SEND_CHANGE_TRACK_IMAGE, ChangeTrack);
  16. }
  17. //开启识别
  18. private void ChangeTrack(System.Object datas)
  19. {
  20. isRunning = (bool)datas;//新的状态
  21. CDebug.Log("切换当前的识别状态" + isRunning);
  22. // ImagTracker.SetTrack(isRunning);
  23. }
  24. }