예제 #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);
         }
     }
 }
예제 #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();
         }
     }
 }