private void OnFaceSnapshotReady(Asset_Texture texture) { if (faceSnapshot != null) { Destroy(faceSnapshot); } if (texture != null) { faceSnapshot = texture.texture; } OnUpdate?.Invoke(this); OnFaceSnapshotReadyEvent?.Invoke(faceSnapshot); }
public void OverrideAvatar(AvatarModel newModel, Texture2D newFaceSnapshot) { if (model?.snapshots != null) { if (thumbnailPromise != null) { ThumbnailsManager.ForgetThumbnail(thumbnailPromise); thumbnailPromise = null; } OnFaceSnapshotReady(null); } model.avatar.CopyFrom(newModel); this.faceSnapshot = newFaceSnapshot; OnUpdate?.Invoke(this); OnFaceSnapshotReadyEvent?.Invoke(faceSnapshot); }
private void OnFaceSnapshotReady(Sprite sprite) { faceSnapshot = sprite; OnUpdate?.Invoke(this); OnFaceSnapshotReadyEvent?.Invoke(sprite); }