1234567891011121314151617181920212223242526272829303132 |
- using Immersal.AR.Nreal;
- using System.Collections.Generic;
- using UnityEngine;
- public class ControlLocalizer: MonoBehaviour
- {
- public NRLocalizer NRLocalizer;
- public GameObject irobot;
- public List<GameObject> list = new List<GameObject>();
- private float time = 0f;
- private bool first=false;
- void Update()
- {
- time += Time.deltaTime;
- if(time > 2 && (irobot.activeSelf || first))
- {
- NRLocalizer.Localize();
- time= 0;
- if (!first)
- {
- first = true;
- foreach(GameObject go in list)
- {
- go.SetActive(true);
- }
- }
- }
- }
- }
|