Ejemplo n.º 1
0
 private void Setup(Anchor realAnchor, bool dontDestroyOnLoad)
 {
     m_RealAnchor = realAnchor;
     if (dontDestroyOnLoad)
     {
         DontDestroyOnLoad(transform);
     }
 }
Ejemplo n.º 2
0
        private void CreateNewAnchor()
        {
            Debug.Log("Creating new Anchor!");
            CacheAnchorChildren();
            var plane = ARSessionManager.Instance.FloorPlane;

            m_RealAnchor = plane.CreateAnchor(plane.CenterPose);
            AttachChildrenToRealAnchor();
        }
Ejemplo n.º 3
0
    public TargetSymbol AppearSymbol(Vector3 appearPoint, int index, string uuid)
    {
        TargetSymbol targetSymbol;

#if UNITY_ANDROID || UNITY_EDITOR
        GoogleARCore.Anchor anchor = GoogleARCore.Session.CreateAnchor(Pose.identity);
        anchor.transform.parent = this.transform;
        targetSymbol            = Util.InstantiateTo <TargetSymbol>(anchor.gameObject, symbolObject);;
#else
        targetSymbol = Util.InstantiateTo <TargetSymbol>(this.gameObject, symbolObject);
#endif
        targetSymbol.Init(index, uuid);
        targetSymbol.transform.position = appearPoint;
        appearSymbols.Add(targetSymbol);
        return(targetSymbol);
    }
        // Start is called before the first frame update
        private void Start()
        {
#if WLT_ARCORE_SDK_INCLUDED
            internalAnchor = Session.CreateAnchor(transform.GetGlobalPose());
#endif // WLT_ARCORE_SDK_INCLUDED
        }
Ejemplo n.º 5
0
 // Start is called before the first frame update
 void Start()
 {
     anchor = GetComponent <GoogleARCore.Anchor>();
 }