private void Setup(Anchor realAnchor, bool dontDestroyOnLoad) { m_RealAnchor = realAnchor; if (dontDestroyOnLoad) { DontDestroyOnLoad(transform); } }
private void CreateNewAnchor() { Debug.Log("Creating new Anchor!"); CacheAnchorChildren(); var plane = ARSessionManager.Instance.FloorPlane; m_RealAnchor = plane.CreateAnchor(plane.CenterPose); AttachChildrenToRealAnchor(); }
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 }
// Start is called before the first frame update void Start() { anchor = GetComponent <GoogleARCore.Anchor>(); }