using System; using System.Collections; using System.Collections.Generic; using UnityAtoms.BaseAtoms; using UnityEngine; public class ARContentParent : MonoBehaviour { public GameObjectEvent anchorUpdatedEvent; private void OnEnable() { anchorUpdatedEvent.Register(OnAnchorUpdated); } private void OnDisable() { anchorUpdatedEvent.Unregister(OnAnchorUpdated); } private void OnAnchorUpdated(GameObject anchor) { transform.position = anchor.transform.position; Vector3 rot = anchor.transform.rotation.eulerAngles; transform.rotation = Quaternion.Euler(0,rot.y,0); } }