Beispiel #1
0
 private void SetRegionAttachment(ARCoreFaceRegion region, GameObject prefab)
 {
     foreach (ARFace face in faceManager.trackables)
     {
         FaceRegionAttachments regionAttachments = face.GetComponent <FaceRegionAttachments>();
         if (regionAttachments != null)
         {
             regionAttachments.SetRegionAttachment(region, prefab);
         }
     }
 }
Beispiel #2
0
 public void ResetFace()
 {
     foreach (ARFace face in faceManager.trackables)
     {
         ChangeableFace        changeable        = face.GetComponent <ChangeableFace>();
         FaceRegionAttachments regionAttachments = face.GetComponent <FaceRegionAttachments>();
         if (changeable != null)
         {
             changeable.SetPosePrefab(null);
             changeable.ResetAccessories();
             changeable.SetMeshMaterial(null);
             regionAttachments.Reset();
         }
     }
 }