1234567891011121314151617181920212223242526272829303132 |
- using Immersal.AR.Nreal;
- using Blue;
- using UnityEngine;
- using TMPro;
- public class ControlLocalizer: AbstractController
- {
- public NRLocalizer NRLocalizer;
- private float time = 0f;
- public bool startLocalizer=false;
- public int num=0;
- private void Awake()
- {
- this.SubscribeEvent<StartImmersalLocalizerEvent>(e =>
- {
- startLocalizer = true;
- }).UnSubScribeWhenGameObjectDestroyed(gameObject);
- }
- void Update()
- {
- time += Time.deltaTime;
- if(time > 2 && startLocalizer)
- {
- NRLocalizer.Localize();
- time= 0;
- }
- }
- }
|