private void Awake() { if (helloARController == null) { helloARController = FindObjectOfType <GoogleARCore.Examples.HelloAR.HelloARController>(); } }
/// <summary> /// The Unity Awake() method. /// </summary> public void Awake() { // Enable ARCore to target 60fps camera capture frame rate on supported devices. // Note, Application.targetFrameRate is ignored when QualitySettings.vSyncCount != 0. if (!Instance) { Instance = this; } Application.targetFrameRate = 60; }
public void onbackButtonClilcked() { currentPanel.SetActive(false); homePanel.SetActive(true); currentPanel = homePanel; ARController = GameObject.Find("HelloAR Controller").GetComponent <GoogleARCore.Examples.HelloAR.HelloARController>(); ARController.petObject.GetComponent <FollowGameObject>().followAllowed = false; Destroy(ARController.foodObject); Destroy(ARController.toyObject); //ARController.foodObject.SetActive(false); //ARController.toyObject.SetActive(false); }
public void Start() { if (instance != null && instance != this) { Destroy(this.gameObject); return;//Avoid doing anything else } instance = this; DontDestroyOnLoad(this.gameObject); Debug.Log("Starting " + this.name); }
public void onHomeWalkButtonClicked() { currentPanel.SetActive(false); walkPanel.SetActive(true); currentPanel = walkPanel; if (firstInWalkPanel) { string str = "Move and the cat will follow you"; GameObject.Find("Canvas").GetComponent <TextController>().showInfo(str, 4f); firstInWalkPanel = false; } ARController = GameObject.Find("HelloAR Controller").GetComponent <GoogleARCore.Examples.HelloAR.HelloARController>(); ARController.petObject.GetComponent <FollowGameObject>().followAllowed = true; }
public void onMoodMoodButtonClicked() { ARController = GameObject.Find("HelloAR Controller").GetComponent <GoogleARCore.Examples.HelloAR.HelloARController>(); ARController.SetModel = "toy"; Debug.Log("playing clicked"); }