39 Commits

Author SHA1 Message Date
jeldgees
17da4e8558 Merge branch 'main' of gitlab.ilabt.imec.be:wesign/unity-application 2023-03-12 23:15:56 +01:00
Louis Adriaens
cdb600344f fix 2023-03-12 22:12:14 +00:00
Louis Adriaens
d94457e246 default reviewers added 2023-03-12 22:07:09 +00:00
jeldgees
6f72e29564 Sprint 2 2023-03-12 23:05:30 +01:00
DroneCI
6b445d858c Add build files [skip ci] 2023-03-12 21:44:38 +00:00
Supaaah1
0812f603af Fixed build 2023-03-12 22:36:32 +01:00
Victor Mylle
d07bcf29ca Update .drone.yml 2023-03-12 21:17:00 +00:00
Jelle De Geest
0ac2a1667c Merge branch 'WES-51-fingerspelling-result-view' into 'development'
WES-51-fingerspelling-result-view

See merge request wesign/unity-application!39
2023-03-12 21:15:50 +00:00
Louis Adriaens
aa7f7bc7f3 WES-51-fingerspelling-result-view 2023-03-12 21:15:49 +00:00
Louis Adriaens
69da4d3def Update merge request template 2023-03-12 20:46:22 +00:00
Jelle De Geest
1d1d11ed1a Merge branch 'WES-XX-Mediapipe-integration' into 'development'
Wes xx mediapipe integration

See merge request wesign/unity-application!36
2023-03-12 20:34:17 +00:00
Jelle De Geest
b11eeb465c Wes xx mediapipe integration 2023-03-12 20:34:16 +00:00
DroneCI
8349b5f149 Add build files [skip ci] 2023-03-12 19:42:24 +00:00
Jelle De Geest
a33d1aec65 Merge branch 'WES-56-account-switching' into 'development'
Resolve WES-56 "Account switching"

See merge request wesign/unity-application!32
2023-03-12 19:36:38 +00:00
Dries Van Schuylenbergh
b6b863183e Resolve WES-56 "Account switching" 2023-03-12 19:36:37 +00:00
DroneCI
6e0e0f9900 Add build files [skip ci] 2023-03-12 19:18:27 +00:00
Jelle De Geest
0ea743354b Merge branch 'WES-54-INFO' into 'development'
Resolve WES-54 "Info"

See merge request wesign/unity-application!35
2023-03-12 19:10:59 +00:00
Helena Van Breugel
194b53c0f4 Resolve WES-54 "Info" 2023-03-12 19:10:58 +00:00
DroneCI
0e8203e5fa Add build files [skip ci] 2023-03-12 18:34:02 +00:00
Jelle De Geest
b83b390397 Merge branch 'WES-69-webcam-authorization' into 'development'
Resolve WES-69 "Webcam authorization"

See merge request wesign/unity-application!30
2023-03-12 18:27:07 +00:00
Dries Van Schuylenbergh
84ef8c8cac Resolve WES-69 "Webcam authorization" 2023-03-12 18:27:07 +00:00
DroneCI
60441803ad Add build files [skip ci] 2023-03-12 12:05:01 +00:00
Victor Mylle
614ba35415 Merge branch 'Automatic-Builds' into 'development'
Automatic builds

See merge request wesign/unity-application!34
2023-03-12 11:59:29 +00:00
Victor Mylle
6c08d2c5c4 Automatic builds 2023-03-12 11:59:29 +00:00
Victor Mylle
2acb608bb1 Update .drone.yml 2023-03-12 11:15:55 +00:00
Victor Mylle
b0544dd158 Update .drone.yml 2023-03-12 11:09:50 +00:00
Victor Mylle
4236b4f467 Update .drone.yml 2023-03-12 11:03:22 +00:00
Victor Mylle
0462a288ea Update .drone.yml 2023-03-12 10:04:25 +00:00
Victor Mylle
dda5873fcb Update .drone.yml 2023-03-11 22:16:40 +00:00
Victor Mylle
bae9985d6e Update .drone.yml for commiting the builds 2023-03-11 22:09:50 +00:00
Victor Mylle
3d4c00e467 Merge branch 'Code-Analysis' into 'development'
Code analysis

See merge request wesign/unity-application!29
2023-03-11 22:08:11 +00:00
Victor Mylle
fba2f7d2aa Code analysis 2023-03-11 22:08:10 +00:00
Louis Adriaens
be0acbe025 Default merge request template 2023-03-09 16:44:40 +00:00
Louis Adriaens
b5568a908a Update .gitlab/issue_templates/Default.md 2023-03-09 16:42:27 +00:00
Louis Adriaens
22e6cb27f8 Add new file 2023-03-09 16:40:10 +00:00
Louis Adriaens
88dc81eb22 Add new file 2023-03-09 16:36:18 +00:00
Jelle De Geest
ee81efc8d9 Merge branch 'development' into 'main'
Sprint 1

See merge request wesign/unity-application!7
2023-02-26 18:21:47 +00:00
Dries Van Schuylenbergh
be92ef06f4 Merge branch 'development' into 'main'
Development

See merge request wesign/unity-application!2
2023-02-25 09:07:17 +00:00
Dries Van Schuylenbergh
8a0f506584 Update README.md 2023-02-24 20:21:00 +01:00
1202 changed files with 231424 additions and 263 deletions

View File

@@ -18,3 +18,42 @@ steps:
image: docker.io/library/unity-test-parser:0.1 image: docker.io/library/unity-test-parser:0.1
commands: commands:
- python /app/unity_test_parser.py results_editmode.xml results_playmode.xml - python /app/unity_test_parser.py results_editmode.xml results_playmode.xml
---
kind: pipeline
name: builds
type: docker
trigger:
event:
- push
branch:
- master
- development
- Automatic-Builds
steps:
- name: unity-builds
image: docker.io/library/unity-runner:0.1
commands:
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildWindowsPlayer ./wesign-builds/WeSign-Windows.exe -quit --headless || true
- chmod 777 -R .
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildWindowsPlayer ./wesign-builds/WeSign-Windows.exe -quit --headless
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildLinux64Player ./wesign-builds/WeSign-Linux -quit --headless
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildOSXUniversalPlayer ./wesign-builds/WeSign-MacOS.app -quit --headless
- name: commit-files
image: alpine/git
environment:
GIT_AUTHOR_NAME: DroneCI
GIT_AUTHOR_EMAIL: droneci@wesign.com
GIT_COMMITTER_NAME: DroneCI
GIT_COMMITTER_EMAIL: droneci@wesign.com
commands:
- git config --global user.name "DroneCI"
- git config --global user.email "droneci@wesign.com"
- ls ./wesign-builds
- git add -f ./wesign-builds/WeSign-Windows.exe
- git add -f ./wesign-builds/WeSign-Linux
- git add -f ./wesign-builds/WeSign-MacOS.app
- git commit -m "Add build files [skip ci]"
- git push -f https://oauth2:ixKiNbp48zzmP5PF-epo@gitlab.ilabt.imec.be/wesign/unity-application/

View File

@@ -0,0 +1,41 @@
## Description
_Please provide a brief summary of the changes in this merge request._
_If possible, add a short screengrab or some screenshots of the changes._
## Testing Instructions
_Please provide instructions on how the code reviewers can test your changes:_
1. [Step 1]
2. [Step 2]
3. [Step 3]
4. ...
_Please include any specific information on test data, configurations, or other requirements that are necessary to properly test the changes._
Once you've tested the changes, please confirm that they work as expected and that there are no regressions or unexpected side effects. If any issues are discovered during testing, please include detailed steps to reproduce the issue in the merge request comments. Thank you!
## Related Issues
_Please list any related issues or pull requests that are relevant to this merge request._
_E.g. WES-XXX-..._
## Known bugs or issues
_Please list any known bugs or issues related to the changes in this merge request._
## Checklist
- [ ] I have filled in this template.
- [ ] I have tested my changes thoroughly (both in the editor + **build and run (ctrl+B)**!).
- [ ] I have added appropriate unit tests.
- [ ] I have updated the user documentation as necessary.
- [ ] Code reviewed by 2 people.
## Additional Notes
_Please add any additional notes or comments that may be helpful for reviewers to understand your changes._
/assign_reviewer @wesign/unityappreviewers

View File

@@ -0,0 +1,336 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3497690530580441564
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6844581870036246266}
- component: {fileID: 5327967345904741449}
- component: {fileID: 5164936991071620901}
m_Layer: 5
m_Name: Avatar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6844581870036246266
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3497690530580441564}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7566391564300576380}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &5327967345904741449
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3497690530580441564}
m_CullTransparentMesh: 1
--- !u!114 &5164936991071620901
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3497690530580441564}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7566391564272109400
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7566391564272109401}
- component: {fileID: 7566391564272109415}
- component: {fileID: 7566391564272109414}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7566391564272109401
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7566391564272109400}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7566391564300576380}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 280, y: 100}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &7566391564272109415
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7566391564272109400}
m_CullTransparentMesh: 1
--- !u!114 &7566391564272109414
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7566391564272109400}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Gebruiker
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3602bedf0ebe5b64596873f09eddf57b, type: 2}
m_sharedMaterial: {fileID: -1030930060397404263, guid: 3602bedf0ebe5b64596873f09eddf57b, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 48
m_fontSizeBase: 48
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &7566391564300576383
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7566391564300576380}
- component: {fileID: 7566391564300576379}
- component: {fileID: 6541968173426898777}
- component: {fileID: 7566391564300576381}
m_Layer: 5
m_Name: UserCard
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7566391564300576380
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7566391564300576383}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6844581870036246266}
- {fileID: 7566391564272109401}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 390, y: 100}
m_Pivot: {x: 1, y: 1}
--- !u!222 &7566391564300576379
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7566391564300576383}
m_CullTransparentMesh: 1
--- !u!114 &6541968173426898777
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7566391564300576383}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.19607843}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &7566391564300576381
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7566391564300576383}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6541968173426898777}
m_OnClick:
m_PersistentCalls:
m_Calls: []

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f5103a1b6ba1b0445a0d049203b9b6b2
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f644f795eb772504a9021479ff880420
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -410,6 +410,141 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &589847186
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 589847187}
- component: {fileID: 589847189}
- component: {fileID: 589847188}
m_Layer: 5
m_Name: Error
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &589847187
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 589847186}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 906197777}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 250}
m_SizeDelta: {x: 0, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &589847188
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 589847186}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: <error message>
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190335
m_fontColor: {r: 1, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 1024
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &589847189
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 589847186}
m_CullTransparentMesh: 1
--- !u!1 &629516231 --- !u!1 &629516231
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -754,7 +889,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1229328480} - {fileID: 1229328480}
m_Father: {fileID: 906197777} m_Father: {fileID: 906197777}
m_RootOrder: 1 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0}
@@ -887,9 +1022,10 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 629516232} - {fileID: 629516232}
- {fileID: 840332112} - {fileID: 589847187}
- {fileID: 645809400} - {fileID: 645809400}
- {fileID: 1832217925} - {fileID: 1832217925}
- {fileID: 840332112}
m_Father: {fileID: 1768150806} m_Father: {fileID: 1768150806}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -948,6 +1084,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fc3902e35c042b14f83b24498d31d587, type: 3} m_Script: {fileID: 11500000, guid: fc3902e35c042b14f83b24498d31d587, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
errorMessage: {fileID: 589847186}
inputName: {fileID: 645809401} inputName: {fileID: 645809401}
avatarsContainer: {fileID: 1832217925} avatarsContainer: {fileID: 1832217925}
avatarPrefab: {fileID: 6263784960026409964, guid: c09ef5423059da444ad7743174e9f077, type: 3} avatarPrefab: {fileID: 6263784960026409964, guid: c09ef5423059da444ad7743174e9f077, type: 3}

View File

@@ -0,0 +1,708 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &26280996
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 906197777}
m_Modifications:
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_Name
value: ButtonUser
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_Pivot.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 400
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.y
value: 120
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
--- !u!224 &26280997 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
m_PrefabInstance: {fileID: 26280996}
m_PrefabAsset: {fileID: 0}
--- !u!1 &129643495
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 129643498}
- component: {fileID: 129643497}
- component: {fileID: 129643496}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &129643496
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 129643495}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &129643497
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 129643495}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &129643498
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 129643495}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &519420028
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 519420032}
- component: {fileID: 519420031}
- component: {fileID: 519420029}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &519420029
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
--- !u!20 &519420031
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 0
m_HDR: 1
m_AllowMSAA: 0
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &519420032
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &737692049
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 906197777}
m_Modifications:
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
value: Common/Scenes/StartScreen
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308514, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_Name
value: ButtonBack
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_SizeDelta.x
value: 300
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_SizeDelta.y
value: 120
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
--- !u!224 &737692050 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
m_PrefabInstance: {fileID: 737692049}
m_PrefabAsset: {fileID: 0}
--- !u!1 &906197776
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 906197777}
- component: {fileID: 906197779}
- component: {fileID: 906197778}
m_Layer: 5
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &906197777
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 737692050}
- {fileID: 26280997}
m_Father: {fileID: 1768150806}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &906197778
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &906197779
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
m_CullTransparentMesh: 1
--- !u!1 &1768150802
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1768150806}
- component: {fileID: 1768150805}
- component: {fileID: 1768150804}
- component: {fileID: 1768150803}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1768150803
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768150802}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1768150804
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768150802}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &1768150805
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768150802}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1768150806
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768150802}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 906197777}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 222ac8b048efd45478729efeea1f6110
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,90 @@
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class ChangeUserScreen : MonoBehaviour
{
/// <summary>
/// Prefab of the user selection
/// </summary>
public GameObject userPrefab;
/// <summary>
/// Reference to the container to list all users
/// </summary>
public Transform usersContainer;
/// <summary>
/// Reference to the user list
/// </summary>
public UserList userList;
/// <summary>
/// Index of the current selected user in the UserList
/// </summary>
private int currentUserIndex;
/// <summary>
/// List of references to avatar background sprites (so we can color them nicely)
/// </summary>
private List<Image> userBackgrounds = new List<Image>();
/// <summary>
/// Start is called before the first frame update
/// </summary>
void Start()
{
List<User> users = userList.GetUsers();
currentUserIndex = userList.GetCurrentUserIndex();
for (int i = 0; i < users.Count; i++)
{
User user = users[i];
// Create instance of prefab
GameObject instance = GameObject.Instantiate(userPrefab, usersContainer);
// Store value of i so we can use it the callback (else it would get the value of sprites.Count)
int x = i;
// Add onClick callback
instance.GetComponent<Button>().onClick.AddListener(() => UpdateSelection(x));
// Set username
instance.GetComponentInChildren<TMP_Text>().text = user.username;
// Store reference to image for fancy coloring
Image background = instance.GetComponent<Image>();
userBackgrounds.Add(background);
// Set background color
background.color = i == currentUserIndex ? Color.blue : Color.gray;
// Find correct component for setting the sprite
foreach (Image img in background.GetComponentsInChildren<Image>())
if (img != background)
{
img.sprite = user.avatar;
break;
}
}
}
/// <summary>
/// Update the current selected user
/// </summary>
/// <param name="index">Index to the user in the <c>this.userBackgrounds</c> list</param>
private void UpdateSelection(int index)
{
userBackgrounds[currentUserIndex].color = Color.gray;
currentUserIndex = index;
userBackgrounds[currentUserIndex].color = Color.blue;
}
/// <summary>
/// Select the current selected user and return to the StartScreenScene
/// </summary>
public void IChooseYou()
{
userList.ChangeCurrentUser(currentUserIndex);
userList.Save();
SceneManager.LoadScene("Common/Scenes/StartScreen");
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3a7f31ce7a41c294b95cb1f9fbec207f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -15,6 +15,11 @@ public class UserCreationScreen : MonoBehaviour
/// </summary> /// </summary>
private const int MAX_USERNAME_LENGTH = 12; private const int MAX_USERNAME_LENGTH = 12;
/// <summary>
/// Reference to the error message to display when a certain usernmae is invalid or already exists
/// </summary>
public GameObject errorMessage;
/// <summary> /// <summary>
/// Reference to the input text field for username /// Reference to the input text field for username
/// </summary> /// </summary>
@@ -57,6 +62,8 @@ public class UserCreationScreen : MonoBehaviour
/// </summary> /// </summary>
void Start() void Start()
{ {
errorMessage.SetActive(false);
for (int i = 0; i < sprites.Count; i++) for (int i = 0; i < sprites.Count; i++)
{ {
// Create instance of prefab // Create instance of prefab
@@ -100,7 +107,7 @@ public class UserCreationScreen : MonoBehaviour
/// <returns><c>true</c> if the username was valid, <c>false</c> otherwise</returns> /// <returns><c>true</c> if the username was valid, <c>false</c> otherwise</returns>
static public bool IsValidUsername(string username) static public bool IsValidUsername(string username)
{ {
return new Regex($@"^[abcdefghijklmnopqrstuvwxyz]{{1,{MAX_USERNAME_LENGTH}}}$").IsMatch(username); return new Regex($@"^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]{{1,{MAX_USERNAME_LENGTH}}}$").IsMatch(username);
} }
/// <summary> /// <summary>
@@ -115,16 +122,22 @@ public class UserCreationScreen : MonoBehaviour
if (users.GetUserByUsername(username) == null) if (users.GetUserByUsername(username) == null)
{ {
// Create a new entry in the UserList ScriptableObject // Create a new entry in the UserList ScriptableObject
users.CreateAndAddNewUser(username, sprites[selectedAvatar]); users.ChangeCurrentUser(users.CreateAndAddNewUser(username, sprites[selectedAvatar]));
// TODO: change scene, for now just change to StartScreen // TODO: change scene, for now just change to StartScreen
SceneManager.LoadScene("Common/Scenes/StartScreen"); SceneManager.LoadScene("Common/Scenes/StartScreen");
} }
// TODO: give more feedback to user
// Warn user that username already exists // Warn user that username already exists
else Debug.LogWarning($"Username '{username}' already exists!"); else
{
errorMessage.SetActive(true);
errorMessage.GetComponent<TMP_Text>().text = "Deze gebruikersnaam bestaat al! Kies een andere.";
}
} }
// TODO: give more feedback to user
// Warn user that username is invalid // Warn user that username is invalid
else Debug.LogWarning($"Invalid username '{username}'!"); else
{
errorMessage.SetActive(true);
errorMessage.GetComponent<TMP_Text>().text = "Je gebruikersnaam moet bestaan uit minimum 1 en maximum 12 letters (a-z en A-Z) of cijfers (0-9).";
}
} }
} }

View File

@@ -20,6 +20,7 @@ public class UserList : ScriptableObject
/// The index of the current/last logged in user in the <c>storedUsers</c> list /// The index of the current/last logged in user in the <c>storedUsers</c> list
/// </summary> /// </summary>
public int currentUserIndex; public int currentUserIndex;
/// <summary> /// <summary>
/// A list containing all users (which can be serialized) /// A list containing all users (which can be serialized)
/// </summary> /// </summary>
@@ -105,6 +106,33 @@ public class UserList : ScriptableObject
return storedUserList.storedUsers[storedUserList.currentUserIndex]; return storedUserList.storedUsers[storedUserList.currentUserIndex];
} }
/// <summary>
/// Get the index in the userlist of the current playing user
/// </summary>
/// <returns></returns>
public int GetCurrentUserIndex()
{
return storedUserList.currentUserIndex;
}
/// <summary>
/// Change the current user
/// </summary>
/// <param name="index">Index of the user in the userlist</param>
public void ChangeCurrentUser(int index)
{
storedUserList.currentUserIndex = index;
}
/// <summary>
/// Change the current user
/// </summary>
/// <param name="user">Reference to the user in the userlist</param>
public void ChangeCurrentUser(User user)
{
storedUserList.currentUserIndex = storedUserList.storedUsers.IndexOf(user);
}
/// <summary> /// <summary>
/// Save the users /// Save the users
/// </summary> /// </summary>

View File

@@ -19,10 +19,10 @@ public class TestUserCreationScreen : MonoBehaviour
/// </summary> /// </summary>
public void TestIsValidUsernameTrue() public void TestIsValidUsernameTrue()
{ {
foreach (char c in "abcdefghijklmnopqrstuvwxyz") foreach (char c in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
Debug.Assert(UserCreationScreen.IsValidUsername(c.ToString())); Debug.Assert(UserCreationScreen.IsValidUsername(c.ToString()));
Debug.Assert(UserCreationScreen.IsValidUsername("abcdefghijkl")); Debug.Assert(UserCreationScreen.IsValidUsername("123456789AbC"));
} }
/// <summary> /// <summary>
@@ -31,9 +31,9 @@ public class TestUserCreationScreen : MonoBehaviour
public void TestIsValidUsernameFalse() public void TestIsValidUsernameFalse()
{ {
Debug.Assert(!UserCreationScreen.IsValidUsername(string.Empty)); Debug.Assert(!UserCreationScreen.IsValidUsername(string.Empty));
foreach (char c in " \n\t0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ+-*/%_(){}[]\\") foreach (char c in " \n\t+-*/%_.,;:!?(){}[]\\'\"§|&~^$")
Debug.Assert(!UserCreationScreen.IsValidUsername(c.ToString())); Debug.Assert(!UserCreationScreen.IsValidUsername(c.ToString()));
Debug.Assert(!UserCreationScreen.IsValidUsername("abcdefghijklmnopqrstuvwxyz")); Debug.Assert(!UserCreationScreen.IsValidUsername("123456789_10_11_12_13"));
} }
} }

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,274 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &573435156647754286
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6673024506491970917}
- component: {fileID: 6572844385529223846}
- component: {fileID: 7907678336598372947}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6673024506491970917
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 573435156647754286}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1769699556132214506}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6572844385529223846
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 573435156647754286}
m_CullTransparentMesh: 1
--- !u!114 &7907678336598372947
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 573435156647754286}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Progressie
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &879769956311181956
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4001770636160324653}
- component: {fileID: 6370645511788604628}
- component: {fileID: 9135174998860060427}
- component: {fileID: 8092455001377820707}
m_Layer: 5
m_Name: Change User
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4001770636160324653
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 879769956311181956}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3890350799411636132}
m_Father: {fileID: 1935285004959629519}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &6370645511788604628
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 879769956311181956}
m_CullTransparentMesh: 1
--- !u!114 &9135174998860060427
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 879769956311181956}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8092455001377820707
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 879769956311181956}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 9135174998860060427}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9192617418029337932}
m_TargetAssemblyTypeName: UserButton, Assembly-CSharp
m_MethodName: ChangeUserCallback
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &2823887524698191629 --- !u!1 &2823887524698191629
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -32,6 +301,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1935285004959629519}
- {fileID: 2823887524728706603} - {fileID: 2823887524728706603}
- {fileID: 1210792399173439368} - {fileID: 1210792399173439368}
m_Father: {fileID: 0} m_Father: {fileID: 0}
@@ -94,10 +364,10 @@ MonoBehaviour:
m_OnClick: m_OnClick:
m_PersistentCalls: m_PersistentCalls:
m_Calls: m_Calls:
- m_Target: {fileID: 7528776122952476157} - m_Target: {fileID: 9192617418029337932}
m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp m_TargetAssemblyTypeName: UserButton, Assembly-CSharp
m_MethodName: LoadScene m_MethodName: ToggleDropdown
m_Mode: 5 m_Mode: 1
m_Arguments: m_Arguments:
m_ObjectArgument: {fileID: 0} m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
@@ -133,6 +403,7 @@ MonoBehaviour:
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2} userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
avatar: {fileID: 692645475575553623} avatar: {fileID: 692645475575553623}
username: {fileID: 2823887524728706580} username: {fileID: 2823887524728706580}
dropdownBox: {fileID: 5251791132896734340}
--- !u!1 &2823887524728706602 --- !u!1 &2823887524728706602
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -158,13 +429,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2823887524728706602} m_GameObject: {fileID: 2823887524728706602}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 2823887524698191630} m_Father: {fileID: 2823887524698191630}
m_RootOrder: 0 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5} m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5}
@@ -268,6 +539,452 @@ MonoBehaviour:
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0} m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4988454653826181319
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1769699556132214506}
- component: {fileID: 3111431685034357011}
- component: {fileID: 635726262334672988}
- component: {fileID: 223032532547281201}
m_Layer: 5
m_Name: Progress
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1769699556132214506
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4988454653826181319}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6673024506491970917}
m_Father: {fileID: 1935285004959629519}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 200, y: -120}
m_SizeDelta: {x: 380, y: 50}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &3111431685034357011
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4988454653826181319}
m_CullTransparentMesh: 1
--- !u!114 &635726262334672988
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4988454653826181319}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &223032532547281201
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4988454653826181319}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 635726262334672988}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9192617418029337932}
m_TargetAssemblyTypeName: UserButton, Assembly-CSharp
m_MethodName: OpenProgressCallback
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &5251791132896734340
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1935285004959629519}
- component: {fileID: 223486967884636125}
- component: {fileID: 5924386446566375588}
- component: {fileID: 4763916037436670844}
- component: {fileID: 2373970527363311332}
- component: {fileID: 2124430354209020878}
m_Layer: 5
m_Name: Dropdown
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1935285004959629519
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5251791132896734340}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1769699556132214506}
- {fileID: 4001770636160324653}
m_Father: {fileID: 2823887524698191630}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &223486967884636125
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5251791132896734340}
m_CullTransparentMesh: 1
--- !u!114 &5924386446566375588
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5251791132896734340}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4763916037436670844
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5251791132896734340}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5924386446566375588}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9192617418029337932}
m_TargetAssemblyTypeName: UserButton, Assembly-CSharp
m_MethodName: ToggleDropdown
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &2373970527363311332
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5251791132896734340}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 10
m_Right: 10
m_Top: 120
m_Bottom: 10
m_ChildAlignment: 1
m_Spacing: 10
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 1
m_ReverseArrangement: 0
--- !u!114 &2124430354209020878
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5251791132896734340}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!1 &9093457482572222116
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3890350799411636132}
- component: {fileID: 5139338160511700595}
- component: {fileID: 153560489489822420}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3890350799411636132
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9093457482572222116}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4001770636160324653}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5139338160511700595
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9093457482572222116}
m_CullTransparentMesh: 1
--- !u!114 &153560489489822420
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9093457482572222116}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Veranderen van gebruiker
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &9131897851294628014 --- !u!1 &9131897851294628014
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -293,13 +1010,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9131897851294628014} m_GameObject: {fileID: 9131897851294628014}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 2823887524698191630} m_Father: {fileID: 2823887524698191630}
m_RootOrder: 1 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5} m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5}

View File

@@ -0,0 +1,396 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &381012860887265132
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 381012860887265135}
- component: {fileID: 381012860887265105}
- component: {fileID: 381012860887265134}
m_Layer: 5
m_Name: Score
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &381012860887265135
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012860887265132}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 381012861935775044}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 120, y: 10}
m_SizeDelta: {x: 300, y: 80}
m_Pivot: {x: 0, y: 0}
--- !u!222 &381012860887265105
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012860887265132}
m_CullTransparentMesh: 1
--- !u!114 &381012860887265134
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012860887265132}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Score 1
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4288255380
m_fontColor: {r: 0.5803922, g: 0.58431375, b: 0.6, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 40
m_fontSizeBase: 40
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 1024
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &381012861935775045
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 381012861935775044}
- component: {fileID: 381012861935775046}
m_Layer: 5
m_Name: UserInfoHS
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &381012861935775044
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012861935775045}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 381012862209399491}
- {fileID: 381012860887265135}
- {fileID: 6828686836343787011}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &381012861935775046
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012861935775045}
m_CullTransparentMesh: 1
--- !u!1 &381012862209399488
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 381012862209399491}
- component: {fileID: 381012862209399493}
- component: {fileID: 381012862209399490}
m_Layer: 5
m_Name: Avatar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &381012862209399491
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012862209399488}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 381012861935775044}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -294, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &381012862209399493
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012862209399488}
m_CullTransparentMesh: 1
--- !u!114 &381012862209399490
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012862209399488}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &1510507605101839666
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6828686836343787011}
- component: {fileID: 5606047852153443535}
- component: {fileID: 4123359612391490762}
m_Layer: 5
m_Name: Title
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6828686836343787011
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1510507605101839666}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 381012861935775044}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 120, y: -20}
m_SizeDelta: {x: 500, y: 80}
m_Pivot: {x: 0, y: 1}
--- !u!222 &5606047852153443535
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1510507605101839666}
m_CullTransparentMesh: 1
--- !u!114 &4123359612391490762
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1510507605101839666}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Dries
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4292118016
m_fontColor: {r: 0, g: 0.5254902, b: 0.8313726, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 40
m_fontSizeBase: 40
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 154c17a838d2896499bd76d28a584222
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
<<<<<<<< HEAD:Assets/Common/Scenes/InfoCourse.unity.meta
guid: 5ff44b09f5858a64692f58938fd6d2ff
========
guid: 652195ae9a0ff3ad18f6338db6a909bd
>>>>>>>> development:Assets/SpellingBee/Scenes/Game.unity.meta
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8e27404f21454dc4583f76b4c7df0c30
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -687,6 +687,50 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 906197777} m_TransformParent: {fileID: 906197777}
m_Modifications: m_Modifications:
- target: {fileID: 1753085271402439902, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1753085271402439902, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1753085271402439902, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1753085271402439902, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1753085271402439902, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} - target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: ButtonUser value: ButtonUser
@@ -779,6 +823,26 @@ PrefabInstance:
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
value: Common/Scenes/StartScreen value: Common/Scenes/StartScreen
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
--- !u!224 &790881345 stripped --- !u!224 &790881345 stripped
@@ -786,6 +850,141 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} m_CorrespondingSourceObject: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
m_PrefabInstance: {fileID: 790881344} m_PrefabInstance: {fileID: 790881344}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &830464405
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 830464406}
- component: {fileID: 830464408}
- component: {fileID: 830464407}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &830464406
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 830464405}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1377361015}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &830464407
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 830464405}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: x
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 64
m_fontSizeBase: 64
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &830464408
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 830464405}
m_CullTransparentMesh: 1
--- !u!1 &906197776 --- !u!1 &906197776
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -822,6 +1021,7 @@ RectTransform:
- {fileID: 108186281} - {fileID: 108186281}
- {fileID: 955994878} - {fileID: 955994878}
- {fileID: 790881345} - {fileID: 790881345}
- {fileID: 1377361015}
m_Father: {fileID: 1768150806} m_Father: {fileID: 1768150806}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1212,6 +1412,140 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1369063653} m_GameObject: {fileID: 1369063653}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &1377361014
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1377361015}
- component: {fileID: 1377361018}
- component: {fileID: 1377361017}
- component: {fileID: 1377361016}
m_Layer: 5
m_Name: Quit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1377361015
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1377361014}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 830464406}
m_Father: {fileID: 906197777}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 10, y: -10}
m_SizeDelta: {x: 64, y: 64}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1377361016
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1377361014}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1377361017}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 906197780}
m_TargetAssemblyTypeName: StartScreenManager, Assembly-CSharp
m_MethodName: QuitApplication
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1377361017
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1377361014}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1377361018
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1377361014}
m_CullTransparentMesh: 1
--- !u!1 &1637175260 --- !u!1 &1637175260
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -0,0 +1,536 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &519420028
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 519420032}
- component: {fileID: 519420031}
- component: {fileID: 519420029}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &519420029
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
--- !u!20 &519420031
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 0
m_HDR: 1
m_AllowMSAA: 0
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &519420032
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &906197776
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 906197777}
- component: {fileID: 906197779}
- component: {fileID: 906197778}
- component: {fileID: 906197780}
m_Layer: 5
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &906197777
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1663223259}
m_Father: {fileID: 1768150806}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &906197778
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &906197779
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
m_CullTransparentMesh: 1
--- !u!114 &906197780
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f8891598d17bbfb439850bda8d767724, type: 3}
m_Name:
m_EditorClassIdentifier:
errorText: {fileID: 1663223260}
--- !u!1 &1663223258
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1663223259}
- component: {fileID: 1663223261}
- component: {fileID: 1663223260}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1663223259
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1663223258}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 906197777}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1000, y: 256}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1663223260
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1663223258}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 64
m_fontSizeBase: 64
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1663223261
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1663223258}
m_CullTransparentMesh: 1
--- !u!1 &1768150802
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1768150806}
- component: {fileID: 1768150805}
- component: {fileID: 1768150804}
- component: {fileID: 1768150803}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1768150803
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768150802}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1768150804
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768150802}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &1768150805
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768150802}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1768150806
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768150802}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 906197777}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ac3a19079fe45844a996d6a9eb62ad76
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -68,6 +68,6 @@ public class CourseItem : MonoBehaviour
slider.GetComponent<Slider>().value = progress; slider.GetComponent<Slider>().value = progress;
// Add click functionality // Add click functionality
button.onClick.AddListener(() => SceneManager.LoadScene("Courses/Scenes/Course_0")); button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/InfoCourse"));
} }
} }

View File

@@ -0,0 +1,71 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro; // For text
/// <summary>
/// Manager infopage for the Courses
/// </summary>
public class InfoCourse : MonoBehaviour
{
/// <summary>
/// Reference to the courses
/// </summary>
public CourseList list;
// private float maxvalue; In case we want to change progress e.g. amount of words correct, then change maxvalue amount of words etc.
/// <summary>
/// Reference to the users
/// </summary>
public UserList userList;
/// <summary>
/// Reference to the course progress
/// </summary>
private Progress progress;
/// <summary>
/// Title Display
/// </summary>
public TMP_Text title;
/// <summary>
/// Description Display
/// </summary>
public TMP_Text description;
/// <summary>
/// Image Display (Thumbnail)
/// </summary>
public Image courseImage;
/// <summary>
/// Progress bar Display
/// </summary>
public Slider slider;
// Start is called before the first frame update
/// <summary>
/// Sets the infopage for a given course
/// </summary>
void Start()
{
int index = list.currentCourseIndex;
Course course = list.courses[index];
title.text = course.title;
description.text = course.description;
courseImage.sprite = course.thumbnail;
//slider.value = progressValue;
// Set progress
progress = userList.GetCurrentUser().GetCourseProgress(course.index);
if (progress != null)
slider.value = progress.Get<float>("courseProgress");
else
slider.value = 0.0f;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4ee87f3cdcccf934b82f9531c90f3457
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,143 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using static GameController;
/// <summary>
/// Manager infopage for the Minigames
/// </summary>
public class InfoMinigame : MonoBehaviour
{
/// <summary>
/// Reference to the Minigames
/// </summary>
public MinigameList list;
/// <summary>
/// Title Display
/// </summary>
public TMP_Text title;
/// <summary>
/// Description Display
/// </summary>
public TMP_Text description;
/// <summary>
/// Image Display (Thumbnail)
/// </summary>
public Image gameImage;
/// <summary>
/// PlayButton to get to the Minigame
/// </summary>
public Button button;
/// <summary>
/// Control explanation for the Display
/// </summary>
public TMP_Text controls;
// Scores for each user
/// <summary>
/// Reference to the users
/// </summary>
public UserList userList;
/// <summary>
/// Reference to the Minigame progress
/// </summary>
private Progress progress;
/// <summary>
/// Reference to the users-high-scores container object
/// </summary>
public Transform userContainer;
/// <summary>
/// Prefab for the high-score-entries
/// </summary>
public GameObject prefab;
// Start is called before the first frame update
/// <summary>
/// Sets the infopage for a given minigame
/// </summary>
void Start()
{
GenerateContent();
GenerateHighScores();
}
/// <summary>
/// Generates all content accept for the HighScores
/// </summary>
private void GenerateContent()
{
// Get current minigame
int index = list.currentMinigameIndex;
Minigame minigame = list.minigames[index];
// Set main screen
title.text = minigame.title;
description.text = minigame.description;
gameImage.sprite = minigame.thumbnail;
controls.text = minigame.controls;
// Add click functionality
button.onClick.AddListener(() => SceneManager.LoadScene(minigame.minigameEntryPoint));
}
/// <summary>
/// Sets the High Scores (Top 3)
/// </summary>
/// <remarks>
/// TODO: Maybe write a getter for the sorted scores as this is just a copy of the logic implemented in SpellingBee/.../GameController
/// </remarks>
private void GenerateHighScores()
{
// Get current minigame
int index = list.currentMinigameIndex;
Minigame minigame = list.minigames[index];
List<Tuple<string, Sprite, Score>> allScores = new List<Tuple<string, Sprite, Score>>();
foreach (User user in userList.GetUsers())
{
// Get user's progress for this minigame
progress = user.minigames.Find((p) => p != null && p.Get<MinigameIndex>("minigameIndex") == minigame.index);
if (progress != null)
{
// Add scores to dictionary
List<Score> scores = progress.Get<List<Score>>("scores");
foreach (Score score in scores)
{
allScores.Add(new Tuple<string, Sprite, Score>(user.username, user.avatar, score));
}
}
}
// Sort allScores based on Score.scoreValue
allScores.Sort((a, b) => b.Item3.scoreValue.CompareTo(a.Item3.scoreValue));
// Instantiate scoreboard entries
foreach (Tuple<string, Sprite, Score> tup in allScores.Take(3))
{
string username = tup.Item1;
Sprite sprite = tup.Item2;
Score score = tup.Item3;
GameObject instance = GameObject.Instantiate(prefab, userContainer);
instance.transform.Find("Title").GetComponent<TMP_Text>().text = username;
instance.transform.Find("Avatar").GetComponent<Image>().sprite = sprite;
instance.transform.Find("Score").GetComponent<TMP_Text>().text = score.scoreValue.ToString();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 90de9a5c57c2189429073f8aadc9e9b7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -30,4 +30,10 @@ public class Minigame : ScriptableObject
/// The path to the minigame starting scene (<c>path == $"Assets/{minigameEntryPoint}"</c>) /// The path to the minigame starting scene (<c>path == $"Assets/{minigameEntryPoint}"</c>)
/// </summary> /// </summary>
public string minigameEntryPoint; public string minigameEntryPoint;
/// <summary>
/// An explanation on how to play the game and score points
/// </summary>
public string controls;
} }

View File

@@ -47,6 +47,6 @@ public class MinigameItem : MonoBehaviour
title.text = minigame.title; title.text = minigame.title;
// Add click functionality // Add click functionality
button.onClick.AddListener(() => SceneManager.LoadScene(minigame.minigameEntryPoint)); button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/InfoMinigame"));
} }
} }

View File

@@ -23,4 +23,9 @@ public class StartScreenManager : MonoBehaviour
SceneManager.LoadScene("Accounts/Scenes/UserCreationScreen"); SceneManager.LoadScene("Accounts/Scenes/UserCreationScreen");
} }
} }
public void QuitApplication()
{
Application.Quit();
}
} }

View File

@@ -1,5 +1,6 @@
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
/// <summary> /// <summary>
@@ -13,15 +14,20 @@ public class UserButton : MonoBehaviour
public UserList userList; public UserList userList;
/// <summary> /// <summary>
/// UI Reference to the avatar object /// UI reference to the avatar object
/// </summary> /// </summary>
public Image avatar; public Image avatar;
/// <summary> /// <summary>
/// UI Reference to the username object /// UI reference to the username object
/// </summary> /// </summary>
public TMP_Text username; public TMP_Text username;
/// <summary>
/// UI reference to the dropdown box with all options
/// </summary>
public GameObject dropdownBox;
/// <summary> /// <summary>
/// Start is called before the first frame update /// Start is called before the first frame update
/// </summary> /// </summary>
@@ -30,5 +36,30 @@ public class UserButton : MonoBehaviour
User user = userList.GetCurrentUser(); User user = userList.GetCurrentUser();
avatar.sprite = user.avatar; avatar.sprite = user.avatar;
username.text = user.username; username.text = user.username;
dropdownBox.SetActive(false);
}
/// <summary>
/// Change to the UserProgressScreen scene
/// </summary>
public void OpenProgressCallback()
{
SceneManager.LoadScene("Accounts/Scenes/UserProgressScreen");
}
/// <summary>
/// Change to the ChangeUserScreen scene
/// </summary>
public void ChangeUserCallback()
{
SceneManager.LoadScene("Accounts/Scenes/ChangeUserScreen");
}
/// <summary>
/// Toggle the dropdown box
/// </summary>
public void ToggleDropdown()
{
dropdownBox.SetActive(!dropdownBox.activeSelf);
} }
} }

View File

@@ -0,0 +1,39 @@
using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
/// <summary>
/// Authorize and check for available webcam(s)
/// </summary>
public class WebcamAuthorization : MonoBehaviour
{
/// <summary>
/// UI Reference to the text object to display an error message
/// </summary>
public TMP_Text errorText;
/// <summary>
/// Request authorization and check whether at least 1 webcam is available
/// </summary>
/// <returns>IEnumerator object</returns>
IEnumerator Start()
{
yield return Application.RequestUserAuthorization(UserAuthorization.WebCam);
if (Application.HasUserAuthorization(UserAuthorization.WebCam))
{
if (0 < WebCamTexture.devices.Length)
{
SceneManager.LoadScene("Common/Scenes/StartScreen");
}
else
{
errorText.text = "Zorg ervoor dat je webcam correct is aangesloten!";
}
}
else
{
errorText.text = "Zorg ervoor dat deze applicatie toegang heeft tot je webcam!";
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f8891598d17bbfb439850bda8d767724
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -13,9 +13,9 @@ MonoBehaviour:
m_Name: Fingerspelling m_Name: Fingerspelling
m_EditorClassIdentifier: m_EditorClassIdentifier:
index: 0 index: 0
title: Fingerspelling title: Het handalfabet
description: Learn the basics of fingerspelling description: In deze les leer je het vingeralfabet of handalfabet. Van A tot Z
thumbnail: {fileID: 21300000, guid: f2344cd67769733ceb363a41e1d88a65, type: 3} thumbnail: {fileID: 21300000, guid: 1410d7d3db0161d13af116b0c4cb23c2, type: 3}
learnables: learnables:
- name: A - name: A
image: {fileID: 21300000, guid: 7ff2526af24167b4083dab0d9fd486ea, type: 3} image: {fileID: 21300000, guid: 7ff2526af24167b4083dab0d9fd486ea, type: 3}

View File

@@ -1,3 +1,4 @@
using System;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
@@ -78,6 +79,30 @@ public class StartPause : MonoBehaviour
/// </summary> /// </summary>
private int correctWords = 0; private int correctWords = 0;
/// <summary>
/// The "finished" screen
/// </summary>
public GameObject ResultPanel;
/// <summary>
/// Button to go back to courses list
/// </summary>
public Button CoursesButton;
/// <summary>
/// Webcam class to close the webcam when the course is finished
/// </summary>
public Webcam Webcam;
/// <summary>
/// DateTime containint the start moment
/// </summary>
private DateTime startMoment;
/// <summary>
/// Reference to the timeSpent UI
/// </summary>
public TextMeshProUGUI timeSpent;
/// <summary> /// <summary>
/// This function is called when the script is initialised. /// This function is called when the script is initialised.
@@ -108,6 +133,11 @@ public class StartPause : MonoBehaviour
title.text = course.name; title.text = course.name;
NextVideo(); NextVideo();
NextImage(); NextImage();
// Hide the result panel
ResultPanel.SetActive(false);
// Set the startTime
startMoment = DateTime.Now;
} }
// These two functions generate video and image from files // These two functions generate video and image from files
@@ -198,8 +228,18 @@ public class StartPause : MonoBehaviour
/// </summary> /// </summary>
public void FinishCourse() public void FinishCourse()
{ {
// TODO: update progress (maybe this can also be at the `NextSign()`-method) // Show the "finished" screen
progress.AddOrUpdate<float>("courseProgress", correctWords / maxWords); ResultPanel.SetActive(true);
// Set the total time spent UI
TimeSpan time = DateTime.Now - startMoment;
timeSpent.text = time.ToString(@"hh\:mm\:ss");
// Link button
//CoursesButton.onClick.AddListener(() => { SceneManager.LoadScene("Assets/Common/Scenes/CoursesScreen.unity"); });
CoursesButton.onClick.AddListener(() => { Webcam.LoadScene("Assets/Common/Scenes/CoursesScreen.unity"); });
progress.AddOrUpdate<float>("courseProgress", 1f);
userList.Save(); userList.Save();
} }
} }

View File

@@ -85,7 +85,7 @@ public class Webcam : MonoBehaviour
} }
/// <summary> /// <summary>
/// The notmal sceneChanger cannot be used here since the camera also needs to be stopped. /// The normal sceneChanger cannot be used here since the camera also needs to be stopped.
/// This extra functionality is implemented in this function /// This extra functionality is implemented in this function
/// </summary> /// </summary>
/// <param name="sceneName"> The path for the scene you want to travel to, assuming root-directory is Assets</param> /// <param name="sceneName"> The path for the scene you want to travel to, assuming root-directory is Assets</param>

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2eeb6ad0b5f376a4c89c3d60981e3954
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c7edf4cdcf72d7a4ebb045b80f81aa26
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d4cf8a63bc91e254baf15f576e0722c3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,39 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System.Collections;
namespace Mediapipe.Unity
{
public static class AssetLoader
{
private static ResourceManager _ResourceManager;
public static void Provide(ResourceManager manager)
{
_ResourceManager = manager;
}
public static IEnumerator PrepareAssetAsync(string name, string uniqueKey, bool overwrite = false)
{
if (_ResourceManager == null)
{
#if UNITY_EDITOR
Logger.LogWarning("ResourceManager is not provided, so default LocalResourceManager will be used");
_ResourceManager = new LocalResourceManager();
#else
throw new System.InvalidOperationException("ResourceManager is not provided");
#endif
}
return _ResourceManager.PrepareAssetAsync(name, uniqueKey, overwrite);
}
public static IEnumerator PrepareAssetAsync(string name, bool overwrite = false)
{
return PrepareAssetAsync(name, name, overwrite);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b8bd1b384b7c7414cb732e8fbabf95a8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,160 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System.Collections;
using System.IO;
using UnityEngine;
namespace Mediapipe.Unity
{
public class Bootstrap : MonoBehaviour
{
[System.Serializable]
public enum AssetLoaderType
{
StreamingAssets,
AssetBundle,
Local,
}
private const string _TAG = nameof(Bootstrap);
[SerializeField] private ImageSourceType _defaultImageSource;
[SerializeField] private InferenceMode _preferableInferenceMode;
[SerializeField] private AssetLoaderType _assetLoaderType;
[SerializeField] private bool _enableGlog = true;
public InferenceMode inferenceMode { get; private set; }
public bool isFinished { get; private set; }
private bool _isGlogInitialized;
private void OnEnable()
{
var _ = StartCoroutine(Init());
}
private IEnumerator Init()
{
Logger.SetLogger(new MemoizedLogger(100));
Logger.MinLogLevel = Logger.LogLevel.Debug;
Protobuf.SetLogHandler(Protobuf.DefaultLogHandler);
Logger.LogInfo(_TAG, "Setting global flags...");
GlobalConfigManager.SetFlags();
if (_enableGlog)
{
if (Glog.LogDir != null)
{
if (!Directory.Exists(Glog.LogDir))
{
Directory.CreateDirectory(Glog.LogDir);
}
Logger.LogVerbose(_TAG, $"Glog will output files under {Glog.LogDir}");
}
Glog.Initialize("MediaPipeUnityPlugin");
_isGlogInitialized = true;
}
Logger.LogInfo(_TAG, "Initializing AssetLoader...");
switch (_assetLoaderType)
{
case AssetLoaderType.AssetBundle:
{
AssetLoader.Provide(new AssetBundleResourceManager("mediapipe"));
break;
}
case AssetLoaderType.StreamingAssets:
{
AssetLoader.Provide(new StreamingAssetsResourceManager());
break;
}
case AssetLoaderType.Local:
{
#if UNITY_EDITOR
AssetLoader.Provide(new LocalResourceManager());
break;
#else
Logger.LogError("LocalResourceManager is only supported on UnityEditor");
yield break;
#endif
}
default:
{
Logger.LogError($"AssetLoaderType is unknown: {_assetLoaderType}");
yield break;
}
}
DecideInferenceMode();
if (inferenceMode == InferenceMode.GPU)
{
Logger.LogInfo(_TAG, "Initializing GPU resources...");
yield return GpuManager.Initialize();
if (!GpuManager.IsInitialized)
{
Logger.LogWarning("If your native library is built for CPU, change 'Preferable Inference Mode' to CPU from the Inspector Window for Bootstrap");
}
}
Logger.LogInfo(_TAG, "Preparing ImageSource...");
ImageSourceProvider.ImageSource = GetImageSource(_defaultImageSource);
isFinished = true;
}
public ImageSource GetImageSource(ImageSourceType imageSourceType)
{
switch (imageSourceType)
{
case ImageSourceType.WebCamera:
{
return GetComponent<WebCamSource>();
}
case ImageSourceType.Image:
{
return GetComponent<StaticImageSource>();
}
case ImageSourceType.Video:
{
return GetComponent<VideoSource>();
}
case ImageSourceType.Unknown:
default:
{
throw new System.ArgumentException($"Unsupported source type: {imageSourceType}");
}
}
}
private void DecideInferenceMode()
{
#if UNITY_EDITOR_OSX || UNITY_EDITOR_WIN
if (_preferableInferenceMode == InferenceMode.GPU) {
Logger.LogWarning(_TAG, "Current platform does not support GPU inference mode, so falling back to CPU mode");
}
inferenceMode = InferenceMode.CPU;
#else
inferenceMode = _preferableInferenceMode;
#endif
}
private void OnApplicationQuit()
{
GpuManager.Shutdown();
if (_isGlogInitialized)
{
Glog.Shutdown();
}
Protobuf.ResetLogHandler();
Logger.SetLogger(null);
}
}
}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: f4d846393f8d9f20fa64b924b0d95e68
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- globalConfigManagerPrefab: {fileID: 4394522812020757894, guid: 488fbb6a3005b66c2b657204bce83fcf,
type: 3}
- gpuManagerPrefab: {fileID: 7458244645391269047, guid: a84904e562ecaf887b2dba62111bb901,
type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,140 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEngine;
namespace Mediapipe.Unity
{
public static class GlobalConfigManager
{
private const string _TAG = nameof(GlobalConfigManager);
private static string CacheDirPath => Path.Combine(Application.persistentDataPath, "Cache");
private static string ConfigFilePath => Path.Combine(CacheDirPath, "globalConfig.env");
private const string _GlogLogtostderrKey = "GLOG_logtostderr";
private const string _GlogStderrthresholdKey = "GLOG_stderrthreshold";
private const string _GlogMinloglevelKey = "GLOG_minloglevel";
private const string _GlogVKey = "GLOG_v";
private const string _GlogLogDirKey = "GLOG_log_dir";
public static bool GlogLogtostderr
{
get => Config[_GlogLogtostderrKey] == "1";
set => Config[_GlogLogtostderrKey] = value ? "1" : "0";
}
public static int GlogStderrthreshold
{
get => int.Parse(Config[_GlogStderrthresholdKey]);
set => Config[_GlogStderrthresholdKey] = value.ToString();
}
public static int GlogMinloglevel
{
get => int.Parse(Config[_GlogMinloglevelKey]);
set => Config[_GlogMinloglevelKey] = value.ToString();
}
public static int GlogV
{
get => int.Parse(Config[_GlogVKey]);
set => Config[_GlogVKey] = value.ToString();
}
public static string GlogLogDir
{
get => Config[_GlogLogDirKey];
set => Config[_GlogLogDirKey] = value;
}
private static Dictionary<string, string> _Config;
private static Dictionary<string, string> Config
{
get
{
if (_Config == null)
{
_Config = new Dictionary<string, string>() {
{ _GlogLogtostderrKey, "1" },
{ _GlogStderrthresholdKey, "2" },
{ _GlogMinloglevelKey, "0" },
{ _GlogLogDirKey, "" },
{ _GlogVKey, "0" },
};
if (!File.Exists(ConfigFilePath))
{
Logger.LogDebug(_TAG, $"Global config file does not exist: {ConfigFilePath}");
}
else
{
Logger.LogDebug(_TAG, $"Reading the config file ({ConfigFilePath})...");
foreach (var line in File.ReadLines(ConfigFilePath))
{
try
{
var pair = ParseLine(line);
_Config[pair.Item1] = pair.Item2;
}
catch (System.Exception e)
{
Logger.LogWarning($"{e}");
}
}
}
}
return _Config;
}
}
public static void Commit()
{
string[] lines = {
$"{_GlogLogtostderrKey}={(GlogLogtostderr ? "1" : "0")}",
$"{_GlogStderrthresholdKey}={GlogStderrthreshold}",
$"{_GlogMinloglevelKey}={GlogMinloglevel}",
$"{_GlogLogDirKey}={GlogLogDir}",
$"{_GlogVKey}={GlogV}",
};
if (!Directory.Exists(CacheDirPath))
{
var _ = Directory.CreateDirectory(CacheDirPath);
}
File.WriteAllLines(ConfigFilePath, lines, Encoding.UTF8);
Logger.LogInfo(_TAG, "Global config file has been updated");
}
public static void SetFlags()
{
Glog.Logtostderr = GlogLogtostderr;
Glog.Stderrthreshold = GlogStderrthreshold;
Glog.Minloglevel = GlogMinloglevel;
Glog.V = GlogV;
Glog.LogDir = GlogLogDir == "" ? null : Path.Combine(Application.persistentDataPath, GlogLogDir);
}
private static (string, string) ParseLine(string line)
{
var i = line.IndexOf('=');
if (i < 0)
{
throw new System.FormatException("Each line in global config file must include '=', but not found");
}
var key = line.Substring(0, i);
var value = line.Substring(i + 1);
return (key, value);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9b93a8796afa16fd68ef2325d00d4d9a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,311 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Rendering;
using Stopwatch = System.Diagnostics.Stopwatch;
namespace Mediapipe.Unity
{
public abstract class GraphRunner : MonoBehaviour
{
public enum ConfigType
{
None,
CPU,
GPU,
OpenGLES,
}
#pragma warning disable IDE1006
// TODO: make it static
protected string TAG => GetType().Name;
#pragma warning restore IDE1006
[SerializeField] private TextAsset _cpuConfig = null;
[SerializeField] private TextAsset _gpuConfig = null;
[SerializeField] private TextAsset _openGlEsConfig = null;
[SerializeField] private long _timeoutMicrosec = 0;
private static readonly GlobalInstanceTable<int, GraphRunner> _InstanceTable = new GlobalInstanceTable<int, GraphRunner>(5);
private static readonly Dictionary<IntPtr, int> _NameTable = new Dictionary<IntPtr, int>();
protected RunningMode runningMode { get; private set; } = RunningMode.Async;
private bool _isRunning = false;
public InferenceMode inferenceMode => configType == ConfigType.CPU ? InferenceMode.CPU : InferenceMode.GPU;
public virtual ConfigType configType
{
get
{
if (GpuManager.IsInitialized)
{
#if UNITY_ANDROID
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3 && _openGlEsConfig != null)
{
return ConfigType.OpenGLES;
}
#endif
if (_gpuConfig != null)
{
return ConfigType.GPU;
}
}
return _cpuConfig != null ? ConfigType.CPU : ConfigType.None;
}
}
public TextAsset textConfig
{
get
{
switch (configType)
{
case ConfigType.CPU: return _cpuConfig;
case ConfigType.GPU: return _gpuConfig;
case ConfigType.OpenGLES: return _openGlEsConfig;
case ConfigType.None:
default: return null;
}
}
}
public long timeoutMicrosec
{
get => _timeoutMicrosec;
set => _timeoutMicrosec = (long)Mathf.Max(0, value);
}
public long timeoutMillisec
{
get => timeoutMicrosec / 1000;
set => timeoutMicrosec = value * 1000;
}
public RotationAngle rotation { get; private set; } = 0;
private Stopwatch _stopwatch;
protected CalculatorGraph calculatorGraph { get; private set; }
protected Timestamp latestTimestamp;
protected virtual void Start()
{
_InstanceTable.Add(GetInstanceID(), this);
}
protected virtual void OnDestroy()
{
Stop();
}
public WaitForResult WaitForInit(RunningMode runningMode)
{
return new WaitForResult(this, Initialize(runningMode));
}
public virtual IEnumerator Initialize(RunningMode runningMode)
{
this.runningMode = runningMode;
Logger.LogInfo(TAG, $"Config Type = {configType}");
Logger.LogInfo(TAG, $"Running Mode = {runningMode}");
InitializeCalculatorGraph().AssertOk();
_stopwatch = new Stopwatch();
_stopwatch.Start();
Logger.LogInfo(TAG, "Loading dependent assets...");
var assetRequests = RequestDependentAssets();
yield return new WaitWhile(() => assetRequests.Any((request) => request.keepWaiting));
var errors = assetRequests.Where((request) => request.isError).Select((request) => request.error).ToList();
if (errors.Count > 0)
{
foreach (var error in errors)
{
Logger.LogError(TAG, error);
}
throw new InternalException("Failed to prepare dependent assets");
}
}
public abstract void StartRun(ImageSource imageSource);
protected void StartRun(SidePacket sidePacket)
{
calculatorGraph.StartRun(sidePacket).AssertOk();
_isRunning = true;
}
public virtual void Stop()
{
if (calculatorGraph != null)
{
if (_isRunning)
{
using (var status = calculatorGraph.CloseAllPacketSources())
{
if (!status.Ok())
{
Logger.LogError(TAG, status.ToString());
}
}
using (var status = calculatorGraph.WaitUntilDone())
{
if (!status.Ok())
{
Logger.LogError(TAG, status.ToString());
}
}
}
_isRunning = false;
var _ = _NameTable.Remove(calculatorGraph.mpPtr);
calculatorGraph.Dispose();
calculatorGraph = null;
}
if (_stopwatch != null && _stopwatch.IsRunning)
{
_stopwatch.Stop();
}
}
protected void AddPacketToInputStream<T>(string streamName, Packet<T> packet)
{
calculatorGraph.AddPacketToInputStream(streamName, packet).AssertOk();
}
protected void AddTextureFrameToInputStream(string streamName, TextureFrame textureFrame)
{
latestTimestamp = GetCurrentTimestamp();
if (configType == ConfigType.OpenGLES)
{
var gpuBuffer = textureFrame.BuildGpuBuffer(GpuManager.GlCalculatorHelper.GetGlContext());
AddPacketToInputStream(streamName, new GpuBufferPacket(gpuBuffer, latestTimestamp));
return;
}
var imageFrame = textureFrame.BuildImageFrame();
textureFrame.Release();
AddPacketToInputStream(streamName, new ImageFramePacket(imageFrame, latestTimestamp));
}
protected bool TryGetNext<TPacket, TValue>(OutputStream<TPacket, TValue> stream, out TValue value, bool allowBlock, long currentTimestampMicrosec) where TPacket : Packet<TValue>, new()
{
var result = stream.TryGetNext(out value, allowBlock);
return result || allowBlock || stream.ResetTimestampIfTimedOut(currentTimestampMicrosec, timeoutMicrosec);
}
protected long GetCurrentTimestampMicrosec()
{
return _stopwatch == null || !_stopwatch.IsRunning ? -1 : _stopwatch.ElapsedTicks / (TimeSpan.TicksPerMillisecond / 1000);
}
protected Timestamp GetCurrentTimestamp()
{
var microsec = GetCurrentTimestampMicrosec();
return microsec < 0 ? Timestamp.Unset() : new Timestamp(microsec);
}
protected Status InitializeCalculatorGraph()
{
calculatorGraph = new CalculatorGraph();
_NameTable.Add(calculatorGraph.mpPtr, GetInstanceID());
// NOTE: There's a simpler way to initialize CalculatorGraph.
//
// calculatorGraph = new CalculatorGraph(config.text);
//
// However, if the config format is invalid, this code does not initialize CalculatorGraph and does not throw exceptions either.
// The problem is that if you call ObserveStreamOutput in this state, the program will crash.
// The following code is not very efficient, but it will return Non-OK status when an invalid configuration is given.
try
{
var baseConfig = textConfig == null ? null : CalculatorGraphConfig.Parser.ParseFromTextFormat(textConfig.text);
if (baseConfig == null)
{
throw new InvalidOperationException("Failed to get the text config. Check if the config is set to GraphRunner");
}
var status = ConfigureCalculatorGraph(baseConfig);
return !status.Ok() || inferenceMode == InferenceMode.CPU ? status : calculatorGraph.SetGpuResources(GpuManager.GpuResources);
}
catch (Exception e)
{
return Status.FailedPrecondition(e.ToString());
}
}
/// <summary>
/// Configure and initialize the <see cref="CalculatorGraph" />.
/// </summary>
/// <remarks>
/// This is the main process in <see cref="InitializeCalculatorGraph" />.<br />
/// At least, <c>calculatorGraph.Initialize</c> must be called here.
/// In addition to that, <see cref="OutputStream" /> instances should be initialized.
/// </remarks>
/// <param name="config">
/// A <see cref="CalculatorGraphConfig" /> instance corresponding to <see cref="textConfig" />.<br />
/// It can be dynamically modified here.
/// </param>
protected virtual Status ConfigureCalculatorGraph(CalculatorGraphConfig config)
{
return calculatorGraph.Initialize(config);
}
protected void SetImageTransformationOptions(SidePacket sidePacket, ImageSource imageSource, bool expectedToBeMirrored = false)
{
// NOTE: The origin is left-bottom corner in Unity, and right-top corner in MediaPipe.
rotation = imageSource.rotation.Reverse();
var inputRotation = rotation;
var isInverted = CoordinateSystem.ImageCoordinate.IsInverted(rotation);
var shouldBeMirrored = imageSource.isHorizontallyFlipped ^ expectedToBeMirrored;
var inputHorizontallyFlipped = isInverted ^ shouldBeMirrored;
var inputVerticallyFlipped = !isInverted;
if ((inputHorizontallyFlipped && inputVerticallyFlipped) || rotation == RotationAngle.Rotation180)
{
inputRotation = inputRotation.Add(RotationAngle.Rotation180);
inputHorizontallyFlipped = !inputHorizontallyFlipped;
inputVerticallyFlipped = !inputVerticallyFlipped;
}
Logger.LogDebug($"input_rotation = {inputRotation}, input_horizontally_flipped = {inputHorizontallyFlipped}, input_vertically_flipped = {inputVerticallyFlipped}");
sidePacket.Emplace("input_rotation", new IntPacket((int)inputRotation));
sidePacket.Emplace("input_horizontally_flipped", new BoolPacket(inputHorizontallyFlipped));
sidePacket.Emplace("input_vertically_flipped", new BoolPacket(inputVerticallyFlipped));
}
protected WaitForResult WaitForAsset(string assetName, string uniqueKey, long timeoutMillisec, bool overwrite = false)
{
return new WaitForResult(this, AssetLoader.PrepareAssetAsync(assetName, uniqueKey, overwrite), timeoutMillisec);
}
protected WaitForResult WaitForAsset(string assetName, long timeoutMillisec, bool overwrite = false)
{
return WaitForAsset(assetName, assetName, timeoutMillisec, overwrite);
}
protected WaitForResult WaitForAsset(string assetName, string uniqueKey, bool overwrite = false)
{
return new WaitForResult(this, AssetLoader.PrepareAssetAsync(assetName, uniqueKey, overwrite));
}
protected WaitForResult WaitForAsset(string assetName, bool overwrite = false)
{
return WaitForAsset(assetName, assetName, overwrite);
}
protected abstract IList<WaitForResult> RequestDependentAssets();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 00f8c92dc785a7523b94c869aaead45f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ab516f3bbf28a23489219f7a966fa0cc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,159 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
namespace Mediapipe.Unity
{
public abstract class ImageSource : MonoBehaviour
{
[Serializable]
public struct ResolutionStruct
{
public int width;
public int height;
public double frameRate;
public ResolutionStruct(int width, int height, double frameRate)
{
this.width = width;
this.height = height;
this.frameRate = frameRate;
}
public ResolutionStruct(Resolution resolution)
{
width = resolution.width;
height = resolution.height;
frameRate = resolution.refreshRate;
}
public Resolution ToResolution()
{
return new Resolution() { width = width, height = height, refreshRate = (int)frameRate };
}
public override string ToString()
{
var aspectRatio = $"{width}x{height}";
var frameRateStr = frameRate.ToString("#.##");
return frameRate > 0 ? $"{aspectRatio} ({frameRateStr}Hz)" : aspectRatio;
}
}
public ResolutionStruct resolution { get; protected set; }
/// <remarks>
/// To call this method, the image source must be prepared.
/// </remarks>
/// <returns>
/// <see cref="TextureFormat" /> that is compatible with the current texture.
/// </returns>
public TextureFormat textureFormat => isPrepared ? TextureFormatFor(GetCurrentTexture()) : throw new InvalidOperationException("ImageSource is not prepared");
public virtual int textureWidth => resolution.width;
public virtual int textureHeight => resolution.height;
/// <remarks>
/// If <see cref="type" /> does not support frame rate, it returns zero.
/// </remarks>
public virtual double frameRate => resolution.frameRate;
public float focalLengthPx { get; } = 2.0f; // TODO: calculate at runtime
public virtual bool isHorizontallyFlipped { get; set; } = false;
public virtual bool isVerticallyFlipped { get; } = false;
public virtual bool isFrontFacing { get; } = false;
public virtual RotationAngle rotation { get; } = RotationAngle.Rotation0;
public abstract string sourceName { get; }
public abstract string[] sourceCandidateNames { get; }
public abstract ResolutionStruct[] availableResolutions { get; }
/// <remarks>
/// Once <see cref="Play" /> finishes successfully, it will become true.
/// </remarks>
/// <returns>
/// Returns if the image source is prepared.
/// </returns>
public abstract bool isPrepared { get; }
public abstract bool isPlaying { get; }
/// <summary>
/// Choose the source from <see cref="sourceCandidateNames" />.
/// </summary>
/// <remarks>
/// You need to call <see cref="Play" /> for the change to take effect.
/// </remarks>
/// <param name="sourceId">The index of <see cref="sourceCandidateNames" /></param>
public abstract void SelectSource(int sourceId);
/// <summary>
/// Choose the resolution from <see cref="availableResolutions" />.
/// </summary>
/// <remarks>
/// You need to call <see cref="Play" /> for the change to take effect.
/// </remarks>
/// <param name="resolutionId">The index of <see cref="availableResolutions" /></param>
public void SelectResolution(int resolutionId)
{
var resolutions = availableResolutions;
if (resolutionId < 0 || resolutionId >= resolutions.Length)
{
throw new ArgumentException($"Invalid resolution ID: {resolutionId}");
}
resolution = resolutions[resolutionId];
}
/// <summary>
/// Prepare image source.
/// If <see cref="isPlaying" /> is true, it will reset the image source.
/// </summary>
/// <remarks>
/// When it finishes successfully, <see cref="isPrepared" /> will return true.
/// </remarks>
/// <exception cref="InvalidOperation" />
public abstract IEnumerator Play();
/// <summary>
/// Resume image source.
/// If <see cref="isPlaying" /> is true, it will do nothing.
/// </summary>
/// <exception cref="InvalidOperation">
/// The image source has not been played.
/// </exception>
public abstract IEnumerator Resume();
/// <summary>
/// Pause image source.
/// If <see cref="isPlaying" /> is false, it will do nothing.
/// </summary>
public abstract void Pause();
/// <summary>
/// Stop image source.
/// </summary>
/// <remarks>
/// When it finishes successfully, <see cref="isPrepared" /> will return false.
/// </remarks>
public abstract void Stop();
/// <remarks>
/// To call this method, the image source must be prepared.
/// </remarks>
/// <returns>
/// <see cref="Texture" /> that contains the current image.
/// </returns>
public abstract Texture GetCurrentTexture();
protected static TextureFormat TextureFormatFor(Texture texture)
{
return GraphicsFormatUtility.GetTextureFormat(texture.graphicsFormat);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 78116299de071af7094419302302ec05
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,13 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
public enum ImageSourceType
{
WebCamera = 0,
Image = 1,
Video = 2,
Unknown = 3,
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2e20c591a3836aae1abc65429b7adde1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,136 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using System.Linq;
using UnityEngine;
namespace Mediapipe.Unity
{
public class StaticImageSource : ImageSource
{
[SerializeField] private Texture[] _availableSources;
[SerializeField]
private ResolutionStruct[] _defaultAvailableResolutions = new ResolutionStruct[] {
new ResolutionStruct(512, 512, 0),
new ResolutionStruct(640, 480, 0),
new ResolutionStruct(1280, 720, 0),
};
private Texture2D _outputTexture;
private Texture _image;
private Texture image
{
get
{
if (_image == null && _availableSources != null && _availableSources.Length > 0)
{
image = _availableSources[0];
}
return _image;
}
set
{
_image = value;
resolution = GetDefaultResolution();
}
}
public override double frameRate => 0;
public override string sourceName => image != null ? image.name : null;
public override string[] sourceCandidateNames => _availableSources?.Select(source => source.name).ToArray();
public override ResolutionStruct[] availableResolutions => _defaultAvailableResolutions;
public override bool isPrepared => _outputTexture != null;
private bool _isPlaying = false;
public override bool isPlaying => _isPlaying;
public override void SelectSource(int sourceId)
{
if (sourceId < 0 || sourceId >= _availableSources.Length)
{
throw new ArgumentException($"Invalid source ID: {sourceId}");
}
image = _availableSources[sourceId];
}
public override IEnumerator Play()
{
if (image == null)
{
throw new InvalidOperationException("Image is not selected");
}
if (isPlaying)
{
yield break;
}
InitializeOutputTexture(image);
_isPlaying = true;
yield return null;
}
public override IEnumerator Resume()
{
if (!isPrepared)
{
throw new InvalidOperationException("Image is not prepared");
}
_isPlaying = true;
yield return null;
}
public override void Pause()
{
_isPlaying = false;
}
public override void Stop()
{
_isPlaying = false;
_outputTexture = null;
}
public override Texture GetCurrentTexture()
{
return _outputTexture;
}
private ResolutionStruct GetDefaultResolution()
{
var resolutions = availableResolutions;
return (resolutions == null || resolutions.Length == 0) ? new ResolutionStruct() : resolutions[0];
}
private void InitializeOutputTexture(Texture src)
{
_outputTexture = new Texture2D(textureWidth, textureHeight, TextureFormat.RGBA32, false);
Texture resizedTexture = new Texture2D(textureWidth, textureHeight, TextureFormat.RGBA32, false);
// TODO: assert ConvertTexture finishes successfully
var _ = Graphics.ConvertTexture(src, resizedTexture);
var currentRenderTexture = RenderTexture.active;
var tmpRenderTexture = new RenderTexture(resizedTexture.width, resizedTexture.height, 32);
Graphics.Blit(resizedTexture, tmpRenderTexture);
RenderTexture.active = tmpRenderTexture;
var rect = new UnityEngine.Rect(0, 0, _outputTexture.width, _outputTexture.height);
_outputTexture.ReadPixels(rect, 0, 0);
_outputTexture.Apply();
RenderTexture.active = currentRenderTexture;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bd7955705ab46c72b9124bb116a2dca9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,378 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Collections;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Experimental.Rendering;
namespace Mediapipe.Unity
{
#pragma warning disable IDE0065
using Color = UnityEngine.Color;
#pragma warning restore IDE0065
public class TextureFrame
{
public class ReleaseEvent : UnityEvent<TextureFrame> { }
private const string _TAG = nameof(TextureFrame);
private static readonly GlobalInstanceTable<Guid, TextureFrame> _InstanceTable = new GlobalInstanceTable<Guid, TextureFrame>(100);
/// <summary>
/// A dictionary to look up which native texture belongs to which <see cref="TextureFrame" />.
/// </summary>
/// <remarks>
/// Not all the <see cref="TextureFrame" /> instances are registered.
/// Texture names are queried only when necessary, and the corresponding data will be saved then.
/// </remarks>
private static readonly Dictionary<uint, Guid> _NameTable = new Dictionary<uint, Guid>();
private readonly Texture2D _texture;
private IntPtr _nativeTexturePtr = IntPtr.Zero;
private GlSyncPoint _glSyncToken;
// Buffers that will be used to copy texture data on CPU.
// They won't be initialized until it's necessary.
private Texture2D _textureBuffer;
private Color32[] _pixelsBuffer; // for WebCamTexture
private Color32[] pixelsBuffer
{
get
{
if (_pixelsBuffer == null)
{
_pixelsBuffer = new Color32[width * height];
}
return _pixelsBuffer;
}
}
private readonly Guid _instanceId;
// NOTE: width and height can be accessed from a thread other than Main Thread.
public readonly int width;
public readonly int height;
public readonly TextureFormat format;
private ImageFormat.Types.Format _format = ImageFormat.Types.Format.Unknown;
public ImageFormat.Types.Format imageFormat
{
get
{
if (_format == ImageFormat.Types.Format.Unknown)
{
_format = format.ToImageFormat();
}
return _format;
}
}
public bool isReadable => _texture.isReadable;
// TODO: determine at runtime
public GpuBufferFormat gpuBufferformat => GpuBufferFormat.kBGRA32;
/// <summary>
/// The event that will be invoked when the TextureFrame is released.
/// </summary>
#pragma warning disable IDE1006 // UnityEvent is PascalCase
public readonly ReleaseEvent OnRelease;
#pragma warning restore IDE1006
private TextureFrame(Texture2D texture)
{
_texture = texture;
width = texture.width;
height = texture.height;
format = texture.format;
OnRelease = new ReleaseEvent();
_instanceId = Guid.NewGuid();
_InstanceTable.Add(_instanceId, this);
}
public TextureFrame(int width, int height, TextureFormat format) : this(new Texture2D(width, height, format, false)) { }
public TextureFrame(int width, int height) : this(width, height, TextureFormat.RGBA32) { }
public void CopyTexture(Texture dst)
{
Graphics.CopyTexture(_texture, dst);
}
public void CopyTextureFrom(Texture src)
{
Graphics.CopyTexture(src, _texture);
}
public bool ConvertTexture(Texture dst)
{
return Graphics.ConvertTexture(_texture, dst);
}
public bool ConvertTextureFrom(Texture src)
{
return Graphics.ConvertTexture(src, _texture);
}
/// <summary>
/// Copy texture data from <paramref name="src" />.
/// If <paramref name="src" /> format is different from <see cref="format" />, it converts the format.
/// </summary>
/// <remarks>
/// After calling it, pixel data won't be read from CPU safely.
/// </remarks>
public bool ReadTextureFromOnGPU(Texture src)
{
if (GetTextureFormat(src) != format)
{
return Graphics.ConvertTexture(src, _texture);
}
Graphics.CopyTexture(src, _texture);
return true;
}
/// <summary>
/// Copy texture data from <paramref name="src" />.
/// </summary>
/// <remarks>
/// This operation is slow.
/// If CPU won't access the pixel data, use <see cref="ReadTextureFromOnGPU" /> instead.
/// </remarks>
public void ReadTextureFromOnCPU(Texture src)
{
var textureBuffer = LoadToTextureBuffer(src);
SetPixels32(textureBuffer.GetPixels32());
}
/// <summary>
/// Copy texture data from <paramref name="src" />.
/// </summary>
/// <remarks>
/// In most cases, it should be better to use <paramref name="src" /> directly.
/// </remarks>
public void ReadTextureFromOnCPU(Texture2D src)
{
SetPixels32(src.GetPixels32());
}
/// <summary>
/// Copy texture data from <paramref name="src" />.
/// </summary>
/// <param name="src">
/// The texture from which the pixels are read.
/// Its width and height must match that of the TextureFrame.
/// </param>
/// <remarks>
/// This operation is slow.
/// If CPU won't access the pixel data, use <see cref="ReadTextureFromOnGPU" /> instead.
/// </remarks>
public void ReadTextureFromOnCPU(WebCamTexture src)
{
SetPixels32(src.GetPixels32(pixelsBuffer));
}
public Color GetPixel(int x, int y)
{
return _texture.GetPixel(x, y);
}
public Color32[] GetPixels32()
{
return _texture.GetPixels32();
}
public void SetPixels32(Color32[] pixels)
{
_texture.SetPixels32(pixels);
_texture.Apply();
if (!RevokeNativeTexturePtr())
{
// If this line was executed, there must be a bug.
Logger.LogError("Failed to revoke the native texture.");
}
}
public NativeArray<T> GetRawTextureData<T>() where T : struct
{
return _texture.GetRawTextureData<T>();
}
/// <returns>The texture's native pointer</returns>
public IntPtr GetNativeTexturePtr()
{
if (_nativeTexturePtr == IntPtr.Zero)
{
_nativeTexturePtr = _texture.GetNativeTexturePtr();
var name = (uint)_nativeTexturePtr;
lock (((ICollection)_NameTable).SyncRoot)
{
if (!AcquireName(name, _instanceId))
{
throw new InvalidProgramException($"Another instance (id={_instanceId}) is using the specified name ({name}) now");
}
_NameTable.Add(name, _instanceId);
}
}
return _nativeTexturePtr;
}
public uint GetTextureName()
{
return (uint)GetNativeTexturePtr();
}
public Guid GetInstanceID()
{
return _instanceId;
}
public ImageFrame BuildImageFrame()
{
return new ImageFrame(imageFormat, width, height, 4 * width, GetRawTextureData<byte>());
}
public GpuBuffer BuildGpuBuffer(GlContext glContext)
{
#if UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX || UNITY_ANDROID
var glTextureBuffer = new GlTextureBuffer(GetTextureName(), width, height, gpuBufferformat, OnReleaseTextureFrame, glContext);
return new GpuBuffer(glTextureBuffer);
#else
throw new NotSupportedException("This method is only supported on Linux or Android");
#endif
}
public void RemoveAllReleaseListeners()
{
OnRelease.RemoveAllListeners();
}
// TODO: stop invoking OnRelease when it's already released
public void Release(GlSyncPoint token = null)
{
if (_glSyncToken != null)
{
_glSyncToken.Dispose();
}
_glSyncToken = token;
OnRelease.Invoke(this);
}
/// <summary>
/// Waits until the GPU has executed all commands up to the sync point.
/// This blocks the CPU, and ensures the commands are complete from the point of view of all threads and contexts.
/// </summary>
public void WaitUntilReleased()
{
if (_glSyncToken == null)
{
return;
}
_glSyncToken.Wait();
_glSyncToken.Dispose();
_glSyncToken = null;
}
[AOT.MonoPInvokeCallback(typeof(GlTextureBuffer.DeletionCallback))]
public static void OnReleaseTextureFrame(uint textureName, IntPtr syncTokenPtr)
{
var isIdFound = _NameTable.TryGetValue(textureName, out var _instanceId);
if (!isIdFound)
{
Logger.LogError(_TAG, $"nameof (name={textureName}) is released, but the owner TextureFrame is not found");
return;
}
var isTextureFrameFound = _InstanceTable.TryGetValue(_instanceId, out var textureFrame);
if (!isTextureFrameFound)
{
Logger.LogWarning(_TAG, $"nameof owner TextureFrame of the released texture (name={textureName}) is already garbage collected");
return;
}
var _glSyncToken = syncTokenPtr == IntPtr.Zero ? null : new GlSyncPoint(syncTokenPtr);
textureFrame.Release(_glSyncToken);
}
/// <summary>
/// Remove <paramref name="name" /> from <see cref="_NameTable" /> if it's stale.
/// If <paramref name="name" /> does not exist in <see cref="_NameTable" />, do nothing.
/// </summary>
/// <remarks>
/// If the instance whose id is <paramref name="ownerId" /> owns <paramref name="name" /> now, it still removes <paramref name="name" />.
/// </remarks>
/// <returns>Return if name is available</returns>
private static bool AcquireName(uint name, Guid ownerId)
{
if (_NameTable.TryGetValue(name, out var id))
{
if (ownerId != id && _InstanceTable.TryGetValue(id, out var _))
{
// if instance is found, the instance is using the name.
Logger.LogVerbose($"{id} is using {name} now");
return false;
}
var _ = _NameTable.Remove(name);
}
return true;
}
private static TextureFormat GetTextureFormat(Texture texture)
{
return GraphicsFormatUtility.GetTextureFormat(texture.graphicsFormat);
}
/// <summary>
/// Remove the texture name from <see cref="_NameTable" /> and empty <see cref="_nativeTexturePtr" />.
/// This method needs to be called when an operation is performed that may change the internal texture.
/// </summary>
private bool RevokeNativeTexturePtr()
{
if (_nativeTexturePtr == IntPtr.Zero)
{
return true;
}
var currentName = GetTextureName();
if (!_NameTable.Remove(currentName))
{
return false;
}
_nativeTexturePtr = IntPtr.Zero;
return true;
}
private Texture2D LoadToTextureBuffer(Texture texture)
{
var textureFormat = GetTextureFormat(texture);
if (_textureBuffer == null || _textureBuffer.format != textureFormat)
{
_textureBuffer = new Texture2D(width, height, textureFormat, false);
}
var tmpRenderTexture = RenderTexture.GetTemporary(texture.width, texture.height, 32);
var currentRenderTexture = RenderTexture.active;
RenderTexture.active = tmpRenderTexture;
Graphics.Blit(texture, tmpRenderTexture);
var rect = new UnityEngine.Rect(0, 0, Mathf.Min(tmpRenderTexture.width, _textureBuffer.width), Mathf.Min(tmpRenderTexture.height, _textureBuffer.height));
_textureBuffer.ReadPixels(rect, 0, 0);
_textureBuffer.Apply();
RenderTexture.active = currentRenderTexture;
RenderTexture.ReleaseTemporary(tmpRenderTexture);
return _textureBuffer;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fa7e0da68d497cd578438e238b6a6e7c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,161 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Mediapipe.Unity
{
public class TextureFramePool : MonoBehaviour
{
private const string _TAG = nameof(TextureFramePool);
[SerializeField] private int _poolSize = 10;
private readonly object _formatLock = new object();
private int _textureWidth = 0;
private int _textureHeight = 0;
private TextureFormat _format = TextureFormat.RGBA32;
private Queue<TextureFrame> _availableTextureFrames;
/// <remarks>
/// key: TextureFrame's instance ID
/// </remarks>
private Dictionary<Guid, TextureFrame> _textureFramesInUse;
/// <returns>
/// The total number of texture frames in the pool.
/// </returns>
public int frameCount
{
get
{
var availableTextureFramesCount = _availableTextureFrames == null ? 0 : _availableTextureFrames.Count;
var textureFramesInUseCount = _textureFramesInUse == null ? 0 : _textureFramesInUse.Count;
return availableTextureFramesCount + textureFramesInUseCount;
}
}
private void Start()
{
_availableTextureFrames = new Queue<TextureFrame>(_poolSize);
_textureFramesInUse = new Dictionary<Guid, TextureFrame>();
}
private void OnDestroy()
{
lock (((ICollection)_availableTextureFrames).SyncRoot)
{
_availableTextureFrames.Clear();
_availableTextureFrames = null;
}
lock (((ICollection)_textureFramesInUse).SyncRoot)
{
foreach (var textureFrame in _textureFramesInUse.Values)
{
textureFrame.OnRelease.RemoveListener(OnTextureFrameRelease);
}
_textureFramesInUse.Clear();
_textureFramesInUse = null;
}
}
public void ResizeTexture(int textureWidth, int textureHeight, TextureFormat format)
{
lock (_formatLock)
{
_textureWidth = textureWidth;
_textureHeight = textureHeight;
_format = format;
}
}
public void ResizeTexture(int textureWidth, int textureHeight)
{
ResizeTexture(textureWidth, textureHeight, _format);
}
public bool TryGetTextureFrame(out TextureFrame outFrame)
{
TextureFrame nextFrame = null;
lock (((ICollection)_availableTextureFrames).SyncRoot)
{
if (_poolSize <= frameCount)
{
while (_availableTextureFrames.Count > 0)
{
var textureFrame = _availableTextureFrames.Dequeue();
if (!IsStale(textureFrame))
{
nextFrame = textureFrame;
break;
}
}
}
else
{
nextFrame = CreateNewTextureFrame();
}
}
if (nextFrame == null)
{
outFrame = null;
return false;
}
lock (((ICollection)_textureFramesInUse).SyncRoot)
{
_textureFramesInUse.Add(nextFrame.GetInstanceID(), nextFrame);
}
nextFrame.WaitUntilReleased();
outFrame = nextFrame;
return true;
}
private void OnTextureFrameRelease(TextureFrame textureFrame)
{
lock (((ICollection)_textureFramesInUse).SyncRoot)
{
if (!_textureFramesInUse.Remove(textureFrame.GetInstanceID()))
{
// won't be run
Logger.LogWarning(_TAG, "The released texture does not belong to the pool");
return;
}
if (frameCount > _poolSize || IsStale(textureFrame))
{
return;
}
_availableTextureFrames.Enqueue(textureFrame);
}
}
private bool IsStale(TextureFrame textureFrame)
{
lock (_formatLock)
{
return textureFrame.width != _textureWidth || textureFrame.height != _textureHeight;
}
}
private TextureFrame CreateNewTextureFrame()
{
var textureFrame = new TextureFrame(_textureWidth, _textureHeight, _format);
textureFrame.OnRelease.AddListener(OnTextureFrameRelease);
return textureFrame;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d5da564da19cb6b7d8e4f97f269edc5d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,116 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using System.Linq;
using UnityEngine;
using UnityEngine.Video;
namespace Mediapipe.Unity
{
public class VideoSource : ImageSource
{
[SerializeField] private VideoClip[] _availableSources;
private VideoClip _video;
private VideoClip video
{
get
{
if (_video == null && _availableSources != null && _availableSources.Length > 0)
{
video = _availableSources[0];
}
return _video;
}
set
{
_video = value;
resolution = new ResolutionStruct((int)_video.width, (int)_video.height, _video.frameRate);
}
}
private VideoPlayer _videoPlayer;
public override string sourceName => video != null ? video.name : null;
public override string[] sourceCandidateNames => _availableSources?.Select(source => source.name).ToArray();
public override ResolutionStruct[] availableResolutions => video == null ? null : new ResolutionStruct[] { new ResolutionStruct((int)video.width, (int)video.height, video.frameRate) };
public override bool isPlaying => _videoPlayer != null && _videoPlayer.isPlaying;
public override bool isPrepared => _videoPlayer != null && _videoPlayer.isPrepared;
public override void SelectSource(int sourceId)
{
if (sourceId < 0 || sourceId >= _availableSources.Length)
{
throw new ArgumentException($"Invalid source ID: {sourceId}");
}
video = _availableSources[sourceId];
if (_videoPlayer != null)
{
_videoPlayer.clip = video;
}
}
public override IEnumerator Play()
{
if (video == null)
{
throw new InvalidOperationException("Video is not selected");
}
_videoPlayer = gameObject.AddComponent<VideoPlayer>();
_videoPlayer.renderMode = VideoRenderMode.APIOnly;
_videoPlayer.isLooping = true;
_videoPlayer.clip = video;
_videoPlayer.Prepare();
yield return new WaitUntil(() => _videoPlayer.isPrepared);
_videoPlayer.Play();
}
public override IEnumerator Resume()
{
if (!isPrepared)
{
throw new InvalidOperationException("VideoPlayer is not prepared");
}
if (!isPlaying)
{
_videoPlayer.Play();
}
yield return null;
}
public override void Pause()
{
if (!isPlaying)
{
return;
}
_videoPlayer.Pause();
}
public override void Stop()
{
if (_videoPlayer == null)
{
return;
}
_videoPlayer.Stop();
Destroy(gameObject.GetComponent<VideoPlayer>());
_videoPlayer = null;
}
public override Texture GetCurrentTexture()
{
return _videoPlayer != null ? _videoPlayer.texture : null;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 04085488e5fac35599866a2a6fceeda3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,299 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
#if UNITY_ANDROID
using UnityEngine.Android;
#endif
namespace Mediapipe.Unity
{
public class WebCamSource : ImageSource
{
[Tooltip("For the default resolution, the one whose width is closest to this value will be chosen")]
[SerializeField] private int _preferableDefaultWidth = 1280;
private const string _TAG = nameof(WebCamSource);
[SerializeField]
private ResolutionStruct[] _defaultAvailableResolutions = new ResolutionStruct[] {
new ResolutionStruct(176, 144, 30),
new ResolutionStruct(320, 240, 30),
new ResolutionStruct(424, 240, 30),
new ResolutionStruct(640, 360, 30),
new ResolutionStruct(640, 480, 30),
new ResolutionStruct(848, 480, 30),
new ResolutionStruct(960, 540, 30),
new ResolutionStruct(1280, 720, 30),
new ResolutionStruct(1600, 896, 30),
new ResolutionStruct(1920, 1080, 30),
};
private static readonly object _PermissionLock = new object();
private static bool _IsPermitted = false;
private WebCamTexture _webCamTexture;
private WebCamTexture webCamTexture
{
get => _webCamTexture;
set
{
if (_webCamTexture != null)
{
_webCamTexture.Stop();
}
_webCamTexture = value;
}
}
public override int textureWidth => !isPrepared ? 0 : webCamTexture.width;
public override int textureHeight => !isPrepared ? 0 : webCamTexture.height;
public override bool isVerticallyFlipped => isPrepared && webCamTexture.videoVerticallyMirrored;
public override bool isFrontFacing => isPrepared && (webCamDevice is WebCamDevice valueOfWebCamDevice) && valueOfWebCamDevice.isFrontFacing;
public override RotationAngle rotation => !isPrepared ? RotationAngle.Rotation0 : (RotationAngle)webCamTexture.videoRotationAngle;
private WebCamDevice? _webCamDevice;
private WebCamDevice? webCamDevice
{
get => _webCamDevice;
set
{
if (_webCamDevice is WebCamDevice valueOfWebCamDevice)
{
if (value is WebCamDevice valueOfValue && valueOfValue.name == valueOfWebCamDevice.name)
{
// not changed
return;
}
}
else if (value == null)
{
// not changed
return;
}
_webCamDevice = value;
resolution = GetDefaultResolution();
}
}
public override string sourceName => (webCamDevice is WebCamDevice valueOfWebCamDevice) ? valueOfWebCamDevice.name : null;
private WebCamDevice[] _availableSources;
private WebCamDevice[] availableSources
{
get
{
if (_availableSources == null)
{
_availableSources = WebCamTexture.devices;
}
return _availableSources;
}
set => _availableSources = value;
}
public override string[] sourceCandidateNames => availableSources?.Select(device => device.name).ToArray();
#pragma warning disable IDE0025
public override ResolutionStruct[] availableResolutions
{
get
{
#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
if (webCamDevice is WebCamDevice valueOfWebCamDevice) {
return valueOfWebCamDevice.availableResolutions.Select(resolution => new ResolutionStruct(resolution)).ToArray();
}
#endif
return webCamDevice == null ? null : _defaultAvailableResolutions;
}
}
#pragma warning restore IDE0025
public override bool isPrepared => webCamTexture != null;
public override bool isPlaying => webCamTexture != null && webCamTexture.isPlaying;
private bool _isInitialized;
private IEnumerator Start()
{
yield return GetPermission();
if (!_IsPermitted)
{
_isInitialized = true;
yield break;
}
availableSources = WebCamTexture.devices;
if (availableSources != null && availableSources.Length > 0)
{
webCamDevice = availableSources[0];
}
_isInitialized = true;
}
private IEnumerator GetPermission()
{
lock (_PermissionLock)
{
if (_IsPermitted)
{
yield break;
}
#if UNITY_ANDROID
if (!Permission.HasUserAuthorizedPermission(Permission.Camera))
{
Permission.RequestUserPermission(Permission.Camera);
yield return new WaitForSeconds(0.1f);
}
#elif UNITY_IOS
if (!Application.HasUserAuthorization(UserAuthorization.WebCam)) {
yield return Application.RequestUserAuthorization(UserAuthorization.WebCam);
}
#endif
#if UNITY_ANDROID
if (!Permission.HasUserAuthorizedPermission(Permission.Camera))
{
Logger.LogWarning(_TAG, "Not permitted to use Camera");
yield break;
}
#elif UNITY_IOS
if (!Application.HasUserAuthorization(UserAuthorization.WebCam)) {
Logger.LogWarning(_TAG, "Not permitted to use WebCam");
yield break;
}
#endif
_IsPermitted = true;
yield return new WaitForEndOfFrame();
}
}
public override void SelectSource(int sourceId)
{
if (sourceId < 0 || sourceId >= availableSources.Length)
{
throw new ArgumentException($"Invalid source ID: {sourceId}");
}
webCamDevice = availableSources[sourceId];
}
public override IEnumerator Play()
{
yield return new WaitUntil(() => _isInitialized);
if (!_IsPermitted)
{
throw new InvalidOperationException("Not permitted to access cameras");
}
InitializeWebCamTexture();
webCamTexture.Play();
yield return WaitForWebCamTexture();
}
public override IEnumerator Resume()
{
if (!isPrepared)
{
throw new InvalidOperationException("WebCamTexture is not prepared yet");
}
if (!webCamTexture.isPlaying)
{
webCamTexture.Play();
}
yield return WaitForWebCamTexture();
}
public override void Pause()
{
if (isPlaying)
{
webCamTexture.Pause();
}
}
public override void Stop()
{
if (webCamTexture != null)
{
webCamTexture.Stop();
}
webCamTexture = null;
}
public override Texture GetCurrentTexture()
{
return webCamTexture;
}
private ResolutionStruct GetDefaultResolution()
{
var resolutions = availableResolutions;
return resolutions == null || resolutions.Length == 0 ? new ResolutionStruct() : resolutions.OrderBy(resolution => resolution, new ResolutionStructComparer(_preferableDefaultWidth)).First();
}
private void InitializeWebCamTexture()
{
Stop();
if (webCamDevice is WebCamDevice valueOfWebCamDevice)
{
webCamTexture = new WebCamTexture(valueOfWebCamDevice.name, resolution.width, resolution.height, (int)resolution.frameRate);
return;
}
throw new InvalidOperationException("Cannot initialize WebCamTexture because WebCamDevice is not selected");
}
private IEnumerator WaitForWebCamTexture()
{
const int timeoutFrame = 2000;
var count = 0;
Logger.LogVerbose("Waiting for WebCamTexture to start");
yield return new WaitUntil(() => count++ > timeoutFrame || webCamTexture.width > 16);
if (webCamTexture.width <= 16)
{
throw new TimeoutException("Failed to start WebCam");
}
}
private class ResolutionStructComparer : IComparer<ResolutionStruct>
{
private readonly int _preferableDefaultWidth;
public ResolutionStructComparer(int preferableDefaultWidth)
{
_preferableDefaultWidth = preferableDefaultWidth;
}
public int Compare(ResolutionStruct a, ResolutionStruct b)
{
var aDiff = Mathf.Abs(a.width - _preferableDefaultWidth);
var bDiff = Mathf.Abs(b.width - _preferableDefaultWidth);
if (aDiff != bDiff)
{
return aDiff - bDiff;
}
if (a.height != b.height)
{
// prefer smaller height
return a.height - b.height;
}
// prefer smaller frame rate
return (int)(a.frameRate - b.frameRate);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 498146e99d4934673bd948c8be11227e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,45 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
namespace Mediapipe.Unity
{
public static class ImageSourceProvider
{
private static ImageSource _ImageSource;
public static ImageSource ImageSource
{
get => _ImageSource;
set
{
if (value != null && !value.enabled)
{
value.enabled = true;
}
_ImageSource = value;
}
}
public static ImageSourceType CurrentSourceType
{
get
{
if (_ImageSource is WebCamSource)
{
return ImageSourceType.WebCamera;
}
if (_ImageSource is StaticImageSource)
{
return ImageSourceType.Image;
}
if (_ImageSource is VideoSource)
{
return ImageSourceType.Video;
}
return ImageSourceType.Unknown;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 703949cb153f043aca7381a8f9b21a86
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,131 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System.Collections;
using UnityEngine;
namespace Mediapipe.Unity
{
public abstract class ImageSourceSolution<T> : Solution where T : GraphRunner
{
[SerializeField] protected Screen screen;
[SerializeField] protected T graphRunner;
[SerializeField] protected TextureFramePool textureFramePool;
private Coroutine _coroutine;
public RunningMode runningMode;
public long timeoutMillisec
{
get => graphRunner.timeoutMillisec;
set => graphRunner.timeoutMillisec = value;
}
public override void Play()
{
if (_coroutine != null)
{
Stop();
}
base.Play();
_coroutine = StartCoroutine(Run());
}
public override void Pause()
{
base.Pause();
ImageSourceProvider.ImageSource.Pause();
}
public override void Resume()
{
base.Resume();
var _ = StartCoroutine(ImageSourceProvider.ImageSource.Resume());
}
public override void Stop()
{
base.Stop();
StopCoroutine(_coroutine);
ImageSourceProvider.ImageSource.Stop();
graphRunner.Stop();
}
private IEnumerator Run()
{
var graphInitRequest = graphRunner.WaitForInit(runningMode);
var imageSource = ImageSourceProvider.ImageSource;
yield return imageSource.Play();
if (!imageSource.isPrepared)
{
Logger.LogError(TAG, "Failed to start ImageSource, exiting...");
yield break;
}
// Use RGBA32 as the input format.
// TODO: When using GpuBuffer, MediaPipe assumes that the input format is BGRA, so the following code must be fixed.
textureFramePool.ResizeTexture(imageSource.textureWidth, imageSource.textureHeight, TextureFormat.RGBA32);
SetupScreen(imageSource);
yield return graphInitRequest;
if (graphInitRequest.isError)
{
Logger.LogError(TAG, graphInitRequest.error);
yield break;
}
OnStartRun();
graphRunner.StartRun(imageSource);
var waitWhilePausing = new WaitWhile(() => isPaused);
while (true)
{
if (isPaused)
{
yield return waitWhilePausing;
}
if (!textureFramePool.TryGetTextureFrame(out var textureFrame))
{
yield return new WaitForEndOfFrame();
continue;
}
// Copy current image to TextureFrame
ReadFromImageSource(imageSource, textureFrame);
AddTextureFrameToInputStream(textureFrame);
yield return new WaitForEndOfFrame();
if (runningMode.IsSynchronous())
{
RenderCurrentFrame(textureFrame);
yield return WaitForNextValue();
}
}
}
protected virtual void SetupScreen(ImageSource imageSource)
{
// NOTE: The screen will be resized later, keeping the aspect ratio.
screen.Initialize(imageSource);
}
protected virtual void RenderCurrentFrame(TextureFrame textureFrame)
{
screen.ReadSync(textureFrame);
}
protected abstract void OnStartRun();
protected abstract void AddTextureFrameToInputStream(TextureFrame textureFrame);
protected abstract IEnumerator WaitForNextValue();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a7573abd3c3f9972e964d5c526c34e0a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
namespace Mediapipe.Unity
{
[System.Serializable]
public enum InferenceMode
{
GPU,
CPU,
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d95cf1e3a8fe6741295a3b42972dec58
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,264 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LogLevel = Mediapipe.Unity.Logger.LogLevel;
namespace Mediapipe.Unity
{
public class MemoizedLogger : IExtendedLogger
{
public readonly struct LogStruct
{
public readonly LogLevel logLevel;
public readonly string tag;
public readonly object message;
public readonly DateTime utcTime;
public LogStruct(LogLevel logLevel, string tag, object message)
{
this.logLevel = logLevel;
this.tag = tag;
this.message = message;
utcTime = DateTime.UtcNow;
}
public LogStruct(LogType logType, string tag, object message) : this(GetLogLevelFromLogType(logType), tag, message) { }
private static LogLevel GetLogLevelFromLogType(LogType logType)
{
switch (logType)
{
case LogType.Error:
case LogType.Exception:
{
return LogLevel.Error;
}
case LogType.Warning:
{
return LogLevel.Warn;
}
case LogType.Assert:
case LogType.Log:
default:
{
return LogLevel.Info;
}
}
}
}
public MemoizedLogger(int historySize = 0)
{
this.historySize = historySize;
}
private int _historySize;
public int historySize
{
get => _historySize;
set
{
_historySize = value;
while (_historySize < histories.Count)
{
var _ = histories.Dequeue();
}
}
}
private Queue<LogStruct> _histories;
public Queue<LogStruct> histories
{
get
{
if (_histories == null)
{
_histories = new Queue<LogStruct>(_historySize);
}
return _histories;
}
}
public delegate void LogOutputEventHandler(LogStruct logStruct);
public event LogOutputEventHandler OnLogOutput;
private readonly ILogger _logger = Debug.unityLogger;
public LogType filterLogType
{
get => _logger.filterLogType;
set => _logger.filterLogType = value;
}
public bool logEnabled
{
get => _logger.logEnabled;
set => _logger.logEnabled = value;
}
public ILogHandler logHandler
{
get => _logger.logHandler;
set => _logger.logHandler = value;
}
public bool IsLogTypeAllowed(LogType logType)
{
return true;
}
public void Log(object message)
{
_logger.Log(message);
RecordInfoLog(null, message);
}
public void Log(string tag, object message)
{
_logger.Log(tag, message);
RecordInfoLog(tag, message);
}
public void Log(string tag, object message, UnityEngine.Object context)
{
_logger.Log(tag, message, context);
RecordInfoLog(tag, message);
}
public void Log(LogType logType, object message)
{
_logger.Log(logType, message);
RecordLog(logType, null, message);
}
public void Log(LogType logType, object message, UnityEngine.Object context)
{
_logger.Log(logType, message, context);
RecordLog(logType, null, message);
}
public void Log(LogType logType, string tag, object message)
{
_logger.Log(logType, tag, message);
RecordLog(logType, tag, message);
}
public void Log(LogType logType, string tag, object message, UnityEngine.Object context)
{
_logger.Log(logType, tag, message, context);
RecordLog(logType, tag, message);
}
public void Log(LogLevel logLevel, string tag, object message, UnityEngine.Object context)
{
_logger.Log(logLevel.GetLogType(), tag, message, context);
RecordLog(new LogStruct(logLevel, tag, message));
}
public void Log(LogLevel logLevel, string tag, object message)
{
_logger.Log(logLevel.GetLogType(), tag, message);
RecordLog(new LogStruct(logLevel, tag, message));
}
public void Log(LogLevel logLevel, object message, UnityEngine.Object context)
{
_logger.Log(logLevel.GetLogType(), message, context);
RecordLog(new LogStruct(logLevel, null, message));
}
public void Log(LogLevel logLevel, object message)
{
_logger.Log(logLevel.GetLogType(), message);
RecordLog(new LogStruct(logLevel, null, message));
}
public void LogWarning(string tag, object message)
{
_logger.LogWarning(tag, message);
RecordWarnLog(tag, message);
}
public void LogWarning(string tag, object message, UnityEngine.Object context)
{
_logger.LogWarning(tag, message, context);
RecordWarnLog(tag, message);
}
public void LogError(string tag, object message)
{
_logger.LogError(tag, message);
RecordErrorLog(tag, message);
}
public void LogError(string tag, object message, UnityEngine.Object context)
{
_logger.LogError(tag, message, context);
RecordErrorLog(tag, message);
}
public void LogFormat(LogType logType, string format, params object[] args)
{
_logger.LogFormat(logType, format, args);
}
public void LogFormat(LogType logType, UnityEngine.Object context, string format, params object[] args)
{
_logger.LogFormat(logType, context, format, args);
}
public void LogException(Exception exception)
{
_logger.LogException(exception);
RecordErrorLog(null, exception);
}
public void LogException(Exception exception, UnityEngine.Object context)
{
_logger.LogException(exception, context);
RecordErrorLog(null, exception);
}
public void RecordLog(LogStruct log)
{
lock (((ICollection)histories).SyncRoot)
{
while (histories.Count > 0 && _historySize <= histories.Count)
{
var _ = histories.Dequeue();
}
histories.Enqueue(log);
OnLogOutput?.Invoke(log);
}
}
private void RecordLog(LogType logType, string tag, object message)
{
RecordLog(new LogStruct(logType, tag, message));
}
private void RecordInfoLog(string tag, object message)
{
RecordLog(new LogStruct(LogLevel.Info, tag, message));
}
private void RecordWarnLog(string tag, object message)
{
RecordLog(new LogStruct(LogLevel.Warn, tag, message));
}
private void RecordErrorLog(string tag, object message)
{
RecordLog(new LogStruct(LogLevel.Error, tag, message));
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 00164446b902a4f99ae323de716782fe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,24 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
namespace Mediapipe.Unity
{
[System.Serializable]
public enum RunningMode
{
Async,
NonBlockingSync,
Sync,
}
public static class RunningModeExtension
{
public static bool IsSynchronous(this RunningMode runningMode)
{
return runningMode == RunningMode.Sync || runningMode == RunningMode.NonBlockingSync;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e82590f067b6f1b96ac9dadddcd9ab26
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,98 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using UnityEngine;
using UnityEngine.UI;
namespace Mediapipe.Unity
{
public class Screen : MonoBehaviour
{
[SerializeField] private RawImage _screen;
private ImageSource _imageSource;
public Texture texture
{
private get => _screen.texture;
set => _screen.texture = value;
}
public UnityEngine.Rect uvRect
{
set => _screen.uvRect = value;
}
public void Initialize(ImageSource imageSource)
{
_imageSource = imageSource;
Resize(_imageSource.textureWidth, _imageSource.textureHeight);
Rotate(_imageSource.rotation.Reverse());
ResetUvRect(RunningMode.Async);
texture = imageSource.GetCurrentTexture();
}
public void Resize(int width, int height)
{
_screen.rectTransform.sizeDelta = new Vector2(width, height);
}
public void Rotate(RotationAngle rotationAngle)
{
_screen.rectTransform.localEulerAngles = rotationAngle.GetEulerAngles();
}
public void ReadSync(TextureFrame textureFrame)
{
if (!(texture is Texture2D))
{
texture = new Texture2D(_imageSource.textureWidth, _imageSource.textureHeight, TextureFormat.RGBA32, false);
ResetUvRect(RunningMode.Sync);
}
textureFrame.CopyTexture(texture);
}
private void ResetUvRect(RunningMode runningMode)
{
var rect = new UnityEngine.Rect(0, 0, 1, 1);
if (_imageSource.isVerticallyFlipped && runningMode == RunningMode.Async)
{
// In Async mode, we don't need to flip the screen vertically since the image will be copied on CPU.
rect = FlipVertically(rect);
}
if (_imageSource.isFrontFacing)
{
// Flip the image (not the screen) horizontally.
// It should be taken into account that the image will be rotated later.
var rotation = _imageSource.rotation;
if (rotation == RotationAngle.Rotation0 || rotation == RotationAngle.Rotation180)
{
rect = FlipHorizontally(rect);
}
else
{
rect = FlipVertically(rect);
}
}
uvRect = rect;
}
private UnityEngine.Rect FlipHorizontally(UnityEngine.Rect rect)
{
return new UnityEngine.Rect(1 - rect.x, rect.y, -rect.width, rect.height);
}
private UnityEngine.Rect FlipVertically(UnityEngine.Rect rect)
{
return new UnityEngine.Rect(rect.x, 1 - rect.y, rect.width, -rect.height);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 827c4431af677e057aa6f14170d0785c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,117 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System.Collections;
using UnityEngine;
namespace Mediapipe.Unity
{
public abstract class Solution : MonoBehaviour
{
#pragma warning disable IDE1006
// TODO: make it static
protected virtual string TAG => GetType().Name;
#pragma warning restore IDE1006
public Bootstrap bootstrap;
protected bool isPaused;
protected virtual IEnumerator Start()
{
bootstrap = FindBootstrap();
yield return new WaitUntil(() => bootstrap.isFinished);
Play();
}
/// <summary>
/// Start the main program from the beginning.
/// </summary>
public virtual void Play()
{
isPaused = false;
}
/// <summary>
/// Pause the main program.
/// <summary>
public virtual void Pause()
{
isPaused = true;
}
/// <summary>
/// Resume the main program.
/// If the main program has not begun, it'll do nothing.
/// </summary>
public virtual void Resume()
{
isPaused = false;
}
/// <summary>
/// Stops the main program.
/// </summary>
public virtual void Stop()
{
isPaused = true;
}
protected static void SetupAnnotationController<T>(AnnotationController<T> annotationController, ImageSource imageSource, bool expectedToBeMirrored = false) where T : HierarchicalAnnotation
{
annotationController.isMirrored = expectedToBeMirrored ^ imageSource.isHorizontallyFlipped ^ imageSource.isFrontFacing;
annotationController.rotationAngle = imageSource.rotation.Reverse();
}
protected static void ReadFromImageSource(ImageSource imageSource, TextureFrame textureFrame)
{
var sourceTexture = imageSource.GetCurrentTexture();
// For some reason, when the image is coiped on GPU, latency tends to be high.
// So even when OpenGL ES is available, use CPU to copy images.
var textureType = sourceTexture.GetType();
if (textureType == typeof(WebCamTexture))
{
textureFrame.ReadTextureFromOnCPU((WebCamTexture)sourceTexture);
}
else if (textureType == typeof(Texture2D))
{
textureFrame.ReadTextureFromOnCPU((Texture2D)sourceTexture);
}
else
{
textureFrame.ReadTextureFromOnCPU(sourceTexture);
}
}
protected Bootstrap FindBootstrap()
{
var bootstrapObj = GameObject.Find("Bootstrap");
if (bootstrapObj != null)
{
return bootstrapObj.GetComponent<Bootstrap>();
}
Logger.LogWarning(TAG, "Global Bootstrap instance is not found (maybe running a sample scene directly), "
+ "so activating a fallback Bootstrap instance attached to each Solution object");
var bootstrap = GetComponent<Bootstrap>();
bootstrap.enabled = true;
// hide menu button when trying a single scene.
DisableMenuButton();
return bootstrap;
}
private void DisableMenuButton()
{
var menuButton = GameObject.Find("MenuButton");
menuButton.SetActive(false);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 589adc9f9488f9d8eaee5a408719b452
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
namespace Mediapipe.Unity
{
public class StartSceneController : MonoBehaviour
{
private const string _TAG = nameof(Bootstrap);
[SerializeField] private Image _screen;
[SerializeField] private GameObject _consolePrefab;
private IEnumerator Start()
{
var _ = Instantiate(_consolePrefab, _screen.transform);
var bootstrap = GetComponent<Bootstrap>();
yield return new WaitUntil(() => bootstrap.isFinished);
DontDestroyOnLoad(gameObject);
Logger.LogInfo(_TAG, "Loading the first scene...");
var sceneLoadReq = SceneManager.LoadSceneAsync(1);
yield return new WaitUntil(() => sceneLoadReq.isDone);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2ca6b5afaa693af02957f0d68cf058d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,87 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections;
using UnityEngine;
using Stopwatch = System.Diagnostics.Stopwatch;
namespace Mediapipe.Unity
{
public class WaitForResult : CustomYieldInstruction
{
public object result { get; private set; }
protected object tmpResult;
protected bool isDone = false;
private readonly MonoBehaviour _runner;
private readonly IEnumerator _inner;
private readonly Coroutine _coroutine;
public bool isError { get; private set; } = false;
public Exception error { get; private set; }
public override bool keepWaiting => !isDone && !isError;
public WaitForResult(MonoBehaviour runner, IEnumerator inner, long timeoutMillisec = long.MaxValue)
{
_runner = runner;
_inner = inner;
_coroutine = runner.StartCoroutine(Run(timeoutMillisec));
}
private IEnumerator Run(long timeoutMillisec)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
while (true)
{
try
{
if (stopwatch.ElapsedMilliseconds > timeoutMillisec)
{
_runner.StopCoroutine(_coroutine);
throw new TimeoutException($"{stopwatch.ElapsedMilliseconds}ms has passed");
}
if (!_inner.MoveNext())
{
break;
}
tmpResult = _inner.Current;
}
catch (Exception e)
{
isError = true;
error = e;
yield break;
}
yield return tmpResult;
}
Done(tmpResult);
}
protected virtual void Done(object result)
{
this.result = result;
isDone = true;
}
}
public class WaitForResult<T> : WaitForResult
{
public new T result { get; private set; }
public WaitForResult(MonoBehaviour runner, IEnumerator inner, long timeoutMillisec = long.MaxValue) : base(runner, inner, timeoutMillisec) { }
protected override void Done(object result)
{
this.result = (T)result;
isDone = true;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 374b5ec183b8225d0ac8b0664812f5f1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,730 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &560904344
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 560904345}
- component: {fileID: 560904348}
- component: {fileID: 560904347}
- component: {fileID: 560904346}
m_Layer: 5
m_Name: Screen
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &560904345
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 560904344}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1475592761}
m_Father: {fileID: 884590458}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &560904346
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 560904344}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 827c4431af677e057aa6f14170d0785c, type: 3}
m_Name:
m_EditorClassIdentifier:
_screen: {fileID: 0}
--- !u!114 &560904347
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 560904344}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Texture: {fileID: 0}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
--- !u!222 &560904348
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 560904344}
m_CullTransparentMesh: 1
--- !u!1 &858349201
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 858349204}
- component: {fileID: 858349203}
- component: {fileID: 858349202}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &858349202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 858349201}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &858349203
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 858349201}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &858349204
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 858349201}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &869147449
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 869147450}
- component: {fileID: 869147451}
m_Layer: 0
m_Name: OfficialSolution
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &869147450
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 869147449}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &869147451
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 869147449}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 043ccd99cf82b3cc9bf2e00956ce2b93, type: 3}
m_Name:
m_EditorClassIdentifier:
_configAsset: {fileID: 4900000, guid: 6288c43cdca97374782dac1ea87aa029, type: 3}
_screen: {fileID: 560904347}
_width: 640
_height: 480
_fps: 30
_poseLandmarkListAnnotationController: {fileID: 1475592763}
--- !u!1 &884590454
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 884590458}
- component: {fileID: 884590457}
- component: {fileID: 884590456}
- component: {fileID: 884590455}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &884590455
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 884590454}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &884590456
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 884590454}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &884590457
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 884590454}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 1
m_Camera: {fileID: 1522608648}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &884590458
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 884590454}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 560904345}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1001 &937709944
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1475592761}
m_Modifications:
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1915238444563462411, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
propertyPath: m_Name
value: PoseLandmarkList Annotation
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
--- !u!4 &937709945 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1915238444563462410, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
m_PrefabInstance: {fileID: 937709944}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1475592760
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1475592761}
- component: {fileID: 1475592763}
m_Layer: 5
m_Name: AnnotationLayer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1475592761
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1475592760}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 937709945}
m_Father: {fileID: 560904345}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1475592763
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1475592760}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70c2b36b394190968977c6493e60e0af, type: 3}
m_Name:
m_EditorClassIdentifier:
annotation: {fileID: 2100643019}
_visualizeZ: 0
--- !u!1 &1522608646
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1522608649}
- component: {fileID: 1522608648}
- component: {fileID: 1522608647}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1522608647
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1522608646}
m_Enabled: 1
--- !u!20 &1522608648
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1522608646}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1522608649
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1522608646}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1802405420
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1802405422}
- component: {fileID: 1802405421}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1802405421
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1802405420}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1802405422
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1802405420}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!114 &2100643019 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1915238444563462421, guid: 4418f6a92856c5b51b58a36e3be7ed5c, type: 3}
m_PrefabInstance: {fileID: 937709944}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 39bac9dd52c31ae7aa01a7383bc44853, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 14d8a9174a4263d83bdc4e90eb9a2ef7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,94 @@
# Copyright 2019 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copied from mediapipe/graphs/holistic_tracking/holistic_tracking_gpu.pbtxt
#
# CHANGES:
# - Add ImageTransformationCalculator and rotate the input
# - Remove AnnotationOverlayCalculator
# Tracks and renders pose + hands + face landmarks.
# CPU image. (ImageFrame)
input_stream: "input_video"
output_stream: "pose_landmarks"
output_stream: "pose_world_landmarks"
output_stream: "segmentation_mask"
output_stream: "pose_roi"
output_stream: "pose_detection"
output_stream: "face_landmarks"
output_stream: "left_hand_landmarks"
output_stream: "right_hand_landmarks"
# Throttles the images flowing downstream for flow control. It passes through
# the very first incoming image unaltered, and waits for downstream nodes
# (calculators and subgraphs) in the graph to finish their tasks before it
# passes through another image. All images that come in while waiting are
# dropped, limiting the number of in-flight images in most part of the graph to
# 1. This prevents the downstream nodes from queuing up incoming images and data
# excessively, which leads to increased latency and memory usage, unwanted in
# real-time mobile applications. It also eliminates unnecessarily computation,
# e.g., the output produced by a node may get dropped downstream if the
# subsequent nodes are still busy processing previous inputs.
node {
calculator: "FlowLimiterCalculator"
input_stream: "input_video"
input_stream: "FINISHED:pose_landmarks"
input_stream_info: {
tag_index: "FINISHED"
back_edge: true
}
output_stream: "throttled_input_video"
node_options: {
[type.googleapis.com/mediapipe.FlowLimiterCalculatorOptions] {
max_in_flight: 1
max_in_queue: 1
# Timeout is disabled (set to 0) as first frame processing can take more
# than 1 second.
in_flight_timeout: 0
}
}
}
node: {
calculator: "ImageTransformationCalculator"
input_stream: "IMAGE:throttled_input_video"
output_stream: "IMAGE:transformed_input_video"
node_options: {
[type.googleapis.com/mediapipe.ImageTransformationCalculatorOptions] {
flip_vertically: true
}
}
}
node {
calculator: "HolisticLandmarkCpu"
input_stream: "IMAGE:transformed_input_video"
output_stream: "POSE_LANDMARKS:pose_landmarks"
output_stream: "WORLD_LANDMARKS:pose_world_landmarks"
output_stream: "SEGMENTATION_MASK:segmentation_mask_rotated"
output_stream: "POSE_ROI:pose_roi"
output_stream: "POSE_DETECTION:pose_detection"
output_stream: "FACE_LANDMARKS:face_landmarks"
output_stream: "LEFT_HAND_LANDMARKS:left_hand_landmarks"
output_stream: "RIGHT_HAND_LANDMARKS:right_hand_landmarks"
}
node: {
calculator: "ImageTransformationCalculator"
input_stream: "IMAGE:segmentation_mask_rotated"
output_stream: "IMAGE:segmentation_mask"
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6288c43cdca97374782dac1ea87aa029
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,101 @@
# Copyright 2019 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copied from mediapipe/graphs/holistic_tracking/holistic_tracking_gpu.pbtxt
#
# CHANGES:
# - `input_video` is ImageFrame (ImageFrameToGpuBufferCalculator converts it into GpuBuffer)
# - Add ImageTransformationCalculator and rotate the input
# - Remove AnnotationOverlayCalculator
# Tracks and renders pose + hands + face landmarks.
# ImageFrame
input_stream: "input_video"
output_stream: "pose_landmarks"
output_stream: "pose_world_landmarks"
output_stream: "segmentation_mask"
output_stream: "pose_roi"
output_stream: "pose_detection"
output_stream: "face_landmarks"
output_stream: "left_hand_landmarks"
output_stream: "right_hand_landmarks"
# Throttles the images flowing downstream for flow control. It passes through
# the very first incoming image unaltered, and waits for downstream nodes
# (calculators and subgraphs) in the graph to finish their tasks before it
# passes through another image. All images that come in while waiting are
# dropped, limiting the number of in-flight images in most part of the graph to
# 1. This prevents the downstream nodes from queuing up incoming images and data
# excessively, which leads to increased latency and memory usage, unwanted in
# real-time mobile applications. It also eliminates unnecessarily computation,
# e.g., the output produced by a node may get dropped downstream if the
# subsequent nodes are still busy processing previous inputs.
node {
calculator: "FlowLimiterCalculator"
input_stream: "input_video"
input_stream: "FINISHED:pose_landmarks"
input_stream_info: {
tag_index: "FINISHED"
back_edge: true
}
output_stream: "throttled_input_video"
node_options: {
[type.googleapis.com/mediapipe.FlowLimiterCalculatorOptions] {
max_in_flight: 1
max_in_queue: 1
# Timeout is disabled (set to 0) as first frame processing can take more
# than 1 second.
in_flight_timeout: 0
}
}
}
node: {
calculator: "ImageFrameToGpuBufferCalculator"
input_stream: "throttled_input_video"
output_stream: "throttled_input_video_gpu"
}
node: {
calculator: "ImageTransformationCalculator"
input_stream: "IMAGE_GPU:throttled_input_video_gpu"
output_stream: "IMAGE_GPU:transformed_input_video"
}
node {
calculator: "HolisticLandmarkGpu"
input_stream: "IMAGE:transformed_input_video"
output_stream: "POSE_LANDMARKS:pose_landmarks"
output_stream: "WORLD_LANDMARKS:pose_world_landmarks"
output_stream: "SEGMENTATION_MASK:segmentation_mask_gpu"
output_stream: "POSE_ROI:pose_roi"
output_stream: "POSE_DETECTION:pose_detection"
output_stream: "FACE_LANDMARKS:face_landmarks"
output_stream: "LEFT_HAND_LANDMARKS:left_hand_landmarks"
output_stream: "RIGHT_HAND_LANDMARKS:right_hand_landmarks"
}
node: {
calculator: "ImageTransformationCalculator"
input_stream: "IMAGE_GPU:segmentation_mask_gpu"
output_stream: "IMAGE_GPU:segmentation_mask_unrotated_gpu"
}
node: {
calculator: "GpuBufferToImageFrameCalculator"
input_stream: "segmentation_mask_unrotated_gpu"
output_stream: "segmentation_mask"
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4ecf0a6acdaa4fe499c1339d2d4aeddb
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,203 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
// ATTENTION!: This code is for a tutorial.
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
using Mediapipe.Unity.CoordinateSystem;
namespace Mediapipe.Unity.Tutorial
{
public class Wesign_extractor : MonoBehaviour
{
/// <summary>
/// Config file to set up the graph
/// </summary>
[SerializeField] private TextAsset _configAsset;
/// <summary>
/// The screen object on which the video is displayed
/// </summary>
[SerializeField] private RawImage _screen;
/// <summary>
/// width of the screen
/// </summary>
[SerializeField] private int _width;
/// <summary>
/// height of the screen
/// </summary>
[SerializeField] private int _height;
/// <summary>
/// fps of the screen
/// </summary>
[SerializeField] private int _fps;
/// <summary>
/// Landmark annotation controller to show the landmarks on the screen
/// </summary>
[SerializeField] private PoseLandmarkListAnnotationController _poseLandmarkListAnnotationController;
/// <summary>
/// MediaPipe graph
/// </summary>
private CalculatorGraph _graph;
/// <summary>
/// Resource manager for graph resources
/// </summary>
private ResourceManager _resourceManager;
/// <summary>
/// Webcam texture
/// </summary>
private WebCamTexture _webCamTexture;
/// <summary>
/// Input texture
/// </summary>
private Texture2D _inputTexture;
/// <summary>
/// Screen pixel data
/// </summary>
private Color32[] _pixelData;
/// <summary>
/// Stopwatch to give a timestamp to video frames
/// </summary>
private Stopwatch _stopwatch;
/// <summary>
/// Google Mediapipe setup & run
/// </summary>
/// <returns> IEnumerator </returns>
/// <exception cref="System.Exception"></exception>
private IEnumerator Start()
{
// Webcam setup
if (WebCamTexture.devices.Length == 0)
{
throw new System.Exception("Web Camera devices are not found");
}
var webCamDevice = WebCamTexture.devices[0];
_webCamTexture = new WebCamTexture(webCamDevice.name, _width, _height, _fps);
_webCamTexture.Play();
yield return new WaitUntil(() => _webCamTexture.width > 16);
_screen.rectTransform.sizeDelta = new Vector2(_width, _height);
_screen.texture = _webCamTexture;
// TODO this method is kinda meh you should use ImageFrame
_inputTexture = new Texture2D(_width, _height, TextureFormat.RGBA32, false);
_pixelData = new Color32[_width * _height];
//_resourceManager = new LocalResourceManager();
_resourceManager = new StreamingAssetsResourceManager();
yield return _resourceManager.PrepareAssetAsync("pose_detection.bytes");
yield return _resourceManager.PrepareAssetAsync("pose_landmark_full.bytes");
yield return _resourceManager.PrepareAssetAsync("face_landmark.bytes");
yield return _resourceManager.PrepareAssetAsync("hand_landmark_full.bytes");
yield return _resourceManager.PrepareAssetAsync("face_detection_short_range.bytes");
yield return _resourceManager.PrepareAssetAsync("hand_recrop.bytes");
yield return _resourceManager.PrepareAssetAsync("handedness.txt");
_stopwatch = new Stopwatch();
// Setting up the graph
_graph = new CalculatorGraph(_configAsset.text);
var posestream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(_graph, "pose_landmarks");
var leftstream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(_graph, "left_hand_landmarks");
var rightstream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(_graph, "right_hand_landmarks");
posestream.StartPolling().AssertOk();
leftstream.StartPolling().AssertOk();
rightstream.StartPolling().AssertOk();
_graph.StartRun().AssertOk();
_stopwatch.Start();
while (true)
{
_inputTexture.SetPixels32(_webCamTexture.GetPixels32(_pixelData));
var imageFrame = new ImageFrame(ImageFormat.Types.Format.Srgba, _width, _height, _width * 4, _inputTexture.GetRawTextureData<byte>());
var currentTimestamp = _stopwatch.ElapsedTicks / (System.TimeSpan.TicksPerMillisecond / 1000);
_graph.AddPacketToInputStream("input_video", new ImageFramePacket(imageFrame, new Timestamp(currentTimestamp))).AssertOk();
yield return new WaitForEndOfFrame();
//posestream.TryGetNext(out var poseLandmarks);
if (posestream.TryGetNext(out var poseLandmarks))
{
if (poseLandmarks != null)
{
// Draw the poseLandmarks on the screen
_poseLandmarkListAnnotationController.DrawNow(poseLandmarks);
var x = poseLandmarks.Landmark[0];
UnityEngine.Debug.Log($"Pose Coordinates: {x}");
}
}
if (leftstream.TryGetNext(out var leftLandmarks))
{
if (leftLandmarks != null)
{
var x = leftLandmarks.Landmark[0];
UnityEngine.Debug.Log($"Pose left Coordinates: {x}");
}
}
if (rightstream.TryGetNext(out var rightLandmarks))
{
if (rightLandmarks != null)
{
var x = rightLandmarks.Landmark[0];
UnityEngine.Debug.Log($"Pose right Coordinates: {x}");
}
}
}
}
/// <summary>
/// Propper destruction on the Mediapipegraph
/// </summary>
private void OnDestroy()
{
if (_webCamTexture != null)
{
_webCamTexture.Stop();
}
if (_graph != null)
{
try
{
_graph.CloseInputStream("input_video").AssertOk();
_graph.WaitUntilDone().AssertOk();
}
finally
{
_graph.Dispose();
}
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 043ccd99cf82b3cc9bf2e00956ce2b93
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -200,7 +200,7 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
value: Common/Scenes/StartScreen value: Common/Scenes/InfoMinigame
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8299246693487308514, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} - target: {fileID: 8299246693487308514, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_Name propertyPath: m_Name

View File

@@ -14,6 +14,10 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
index: 0 index: 0
title: Spelling Bee title: Spelling Bee
description: A simple spelling minigame description: In deze minigame krijg je verschillende woorden voorgeschoteld die
je zo snel mogelijk moet spellen met behulp van het vingeralfabet
thumbnail: {fileID: 21300000, guid: d99bb2dc44e35344fa358208a01c06c4, type: 3} thumbnail: {fileID: 21300000, guid: d99bb2dc44e35344fa358208a01c06c4, type: 3}
minigameEntryPoint: SpellingBee/Scenes/ThemeSelection minigameEntryPoint: SpellingBee/Scenes/ThemeSelection
controls: Je begint dit spel met 5 seconden tijd, voor elk juist antwoord krijg
je extra tijd. Hoe sneller je het spel uitspeelt, hoe meer punten je scoort.
Verloopt de timer, dan heb je het spelletje verloren

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"currentUserIndex":0,"storedUsers":[{"username":"testkonijn","avatar":{"instanceID":22348},"playtime":0.0,"courses":[],"minigames":[{"entries":[{"key":"minigameIndex","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,5,1,0,0,0,13,77,105,110,105,103,97,109,101,73,110,100,101,120,1,0,0,0,7,118,97,108,117,101,95,95,0,8,2,0,0,0,0,0,0,0,11]},{"key":"highscore","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,4,1,0,0,0,12,83,121,115,116,101,109,46,73,110,116,51,50,1,0,0,0,7,109,95,118,97,108,117,101,0,8,0,0,0,0,11]},{"key":"scores","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,4,1,0,0,0,129,1,83,121,115,116,101,109,46,67,111,108,108,101,99,116,105,111,110,115,46,71,101,110,101,114,105,99,46,76,105,115,116,96,49,91,91,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,44,32,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,93,93,3,0,0,0,6,95,105,116,101,109,115,5,95,115,105,122,101,8,95,118,101,114,115,105,111,110,4,0,0,22,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,91,93,2,0,0,0,8,8,9,3,0,0,0,10,0,0,0,10,0,0,0,7,3,0,0,0,0,1,0,0,0,10,0,0,0,4,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,9,4,0,0,0,9,5,0,0,0,9,6,0,0,0,9,7,0,0,0,9,8,0,0,0,9,9,0,0,0,9,10,0,0,0,9,11,0,0,0,9,12,0,0,0,9,13,0,0,0,5,4,0,0,0,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,10,115,99,111,114,101,86,97,108,117,101,4,116,105,109,101,0,1,8,2,0,0,0,153,0,0,0,6,14,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,56,58,53,54,1,5,0,0,0,4,0,0,0,17,0,0,0,6,15,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,57,58,53,48,1,6,0,0,0,4,0,0,0,16,0,0,0,6,16,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,51,58,50,50,1,7,0,0,0,4,0,0,0,14,0,0,0,6,17,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,49,58,51,49,1,8,0,0,0,4,0,0,0,12,0,0,0,6,18,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,50,55,58,48,55,1,9,0,0,0,4,0,0,0,11,0,0,0,6,19,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,51,58,53,48,1,10,0,0,0,4,0,0,0,11,0,0,0,6,20,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,52,55,1,11,0,0,0,4,0,0,0,11,0,0,0,6,21,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,54,58,50,56,1,12,0,0,0,4,0,0,0,9,0,0,0,6,22,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,48,58,49,56,1,13,0,0,0,4,0,0,0,8,0,0,0,6,23,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,50,54,11]}]}]}]} {"currentUserIndex":0,"storedUsers":[{"username":"testkonijn","avatar":{"instanceID":0},"playtime":0.0,"courses":[{"entries":[{"key":"courseIndex","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,5,1,0,0,0,11,67,111,117,114,115,101,73,110,100,101,120,1,0,0,0,7,118,97,108,117,101,95,95,0,8,2,0,0,0,0,0,0,0,11]},{"key":"courseProgress","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,4,1,0,0,0,13,83,121,115,116,101,109,46,83,105,110,103,108,101,1,0,0,0,7,109,95,118,97,108,117,101,0,11,205,204,76,62,11]}]}],"minigames":[{"entries":[{"key":"minigameIndex","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,5,1,0,0,0,13,77,105,110,105,103,97,109,101,73,110,100,101,120,1,0,0,0,7,118,97,108,117,101,95,95,0,8,2,0,0,0,0,0,0,0,11]},{"key":"highscore","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,4,1,0,0,0,12,83,121,115,116,101,109,46,73,110,116,51,50,1,0,0,0,7,109,95,118,97,108,117,101,0,8,0,0,0,0,11]},{"key":"scores","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,4,1,0,0,0,129,1,83,121,115,116,101,109,46,67,111,108,108,101,99,116,105,111,110,115,46,71,101,110,101,114,105,99,46,76,105,115,116,96,49,91,91,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,44,32,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,93,93,3,0,0,0,6,95,105,116,101,109,115,5,95,115,105,122,101,8,95,118,101,114,115,105,111,110,4,0,0,22,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,91,93,2,0,0,0,8,8,9,3,0,0,0,10,0,0,0,10,0,0,0,7,3,0,0,0,0,1,0,0,0,10,0,0,0,4,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,9,4,0,0,0,9,5,0,0,0,9,6,0,0,0,9,7,0,0,0,9,8,0,0,0,9,9,0,0,0,9,10,0,0,0,9,11,0,0,0,9,12,0,0,0,9,13,0,0,0,5,4,0,0,0,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,10,115,99,111,114,101,86,97,108,117,101,4,116,105,109,101,0,1,8,2,0,0,0,153,0,0,0,6,14,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,56,58,53,54,1,5,0,0,0,4,0,0,0,17,0,0,0,6,15,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,57,58,53,48,1,6,0,0,0,4,0,0,0,16,0,0,0,6,16,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,51,58,50,50,1,7,0,0,0,4,0,0,0,14,0,0,0,6,17,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,49,58,51,49,1,8,0,0,0,4,0,0,0,12,0,0,0,6,18,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,50,55,58,48,55,1,9,0,0,0,4,0,0,0,11,0,0,0,6,19,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,51,58,53,48,1,10,0,0,0,4,0,0,0,11,0,0,0,6,20,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,52,55,1,11,0,0,0,4,0,0,0,11,0,0,0,6,21,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,54,58,50,56,1,12,0,0,0,4,0,0,0,9,0,0,0,6,22,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,48,58,49,56,1,13,0,0,0,4,0,0,0,8,0,0,0,6,23,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,50,54,11]}]}]}]}

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 homuler
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e728b176561fa96ed8fde03486bbb142
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a0d7e8178b74a234b982e1c9e95b06e7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 997abefdb7c9a1a469fea28ffa80e73a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More