public void AddAccessory(GameObject prefab) { foreach (ARFace face in faceManager.trackables) { ChangeableFace changeable = face.GetComponent <ChangeableFace>(); if (changeable != null) { changeable.AddAccessory(prefab); } } }
public void ChangeMaterial(Material mat) { foreach (ARFace face in faceManager.trackables) { ChangeableFace changeable = face.GetComponent <ChangeableFace>(); if (changeable != null) { changeable.SetMeshMaterial(mat); } } }
public void ChangePosePrefab(GameObject prefab) { foreach (ARFace face in faceManager.trackables) { ChangeableFace changeable = face.GetComponent <ChangeableFace>(); if (changeable != null) { changeable.SetPosePrefab(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(); } } }