-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: simplifies photo capture element scripts
- Loading branch information
1 parent
1b428a4
commit face150
Showing
8 changed files
with
214 additions
and
96 deletions.
There are no files selected for viewing
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
Runtime/AvatarCreator/Elements/PhotoCaptureConfirmElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using UnityEngine; | ||
using UnityEngine.Events; | ||
|
||
public class PhotoCaptureConfirmElement : MonoBehaviour | ||
{ | ||
[Space(5)] | ||
[Header("Events")] | ||
public UnityEvent<Texture2D> onPhotoCaptureConfirmed; | ||
|
||
private Texture2D selectedTexture; | ||
|
||
public void SetTexture(Texture2D texture) | ||
{ | ||
selectedTexture = texture; | ||
} | ||
|
||
public void ConfirmPhoto() | ||
{ | ||
onPhotoCaptureConfirmed?.Invoke(selectedTexture); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.