Example #1
0
 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();
        }
Example #3
0
        void Start()
        {
            networkAnchor = GetComponent <NetworkAnchor>();
            networkAnchor.ReceivedRemoteAnchorTransferBatch += NetworkAnchor_ReceivedRemoteAnchorTransferBatch;

            persistence = GetComponent <AnchorPersistence>();
            persistence.TargetGameObject        = TargetTransform.gameObject;
            persistence.AnchorPersistenceEvent += Persistence_AnchorPersistenceEvent;
        }