public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) { if (obj == null) { if (main.unassigned.Count == 0) { return; } obj = main.unassigned.Dequeue(); obj.SetParent(a.transform); Debug.Log(obj.GetGameObject().transform.localScale); } Debug.Log("hh"); captureButton.SetMode(Mode.DELETE); main.t = this; obj.update(); } else { if (main.t == this) { main.t = null; } captureButton.SetMode(Mode.ADD); } }