private void Persistence_AnchorPersistenceEvent(AnchorPersistence source, AnchorPersistenceEventArgs args) { if (args.Type == AnchorPersistenceEventType.Loaded) { StartCoroutine(networkAnchor.SetDefaultAnchor(args.AnchorId, args.AnchorOwner)); } }
void Start() { persistence = GetComponent <AnchorPersistence>(); persistence.TargetGameObject = TargetTransform.gameObject; persistence.AnchorLoaded += Persistence_AnchorLoaded; Persistence_AnchorLoaded(); }
void Start() { networkAnchor = GetComponent <NetworkAnchor>(); networkAnchor.ReceivedRemoteAnchorTransferBatch += NetworkAnchor_ReceivedRemoteAnchorTransferBatch; persistence = GetComponent <AnchorPersistence>(); persistence.TargetGameObject = TargetTransform.gameObject; persistence.AnchorPersistenceEvent += Persistence_AnchorPersistenceEvent; }