public void CreateAnchor()
        {
            controller.isGameStarted = true;
            anchor = _hit.CreateAnchor(_pose);

            fireworks.transform.position = _position;
            fireworks.transform.rotation = _rotation;
            indicator.transform.SetParent(anchor.transform);
            indicator.SetActive(true);

            createNewGameButton.enabled = false;
        }
예제 #2
0
        public static Anchor CreateAnchor(Pose pose, Trackable trackable = null)
        {
            var nativeSession = LifecycleManager.Instance.NativeSession;

            if (nativeSession == null)
            {
                return(null);
            }
            if (trackable == null)
            {
                return(nativeSession.SessionApi.CreateAnchor(pose));
            }
            else
            {
                return(trackable.CreateAnchor(pose));
            }
        }