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