Resolve WES-99 "Cc refactor"
This commit is contained in:
@@ -394,61 +394,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100123244}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &118887548
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 118887550}
|
||||
- component: {fileID: 118887549}
|
||||
m_Layer: 0
|
||||
m_Name: Button-controller
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &118887549
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 118887548}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ae746f332e314e84c9df74b892c75d4d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
player: {fileID: 993952931}
|
||||
button: {fileID: 1159630774}
|
||||
pauseSprite: {fileID: 21300000, guid: 43db869a07cf51f45a411b6e4a417743, type: 3}
|
||||
wordImage: {fileID: 2145235737}
|
||||
title: {fileID: 388014849}
|
||||
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
|
||||
courselist: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2}
|
||||
ResultPanel: {fileID: 1383144366}
|
||||
CoursesButton: {fileID: 839294691}
|
||||
Webcam: {fileID: 1485779445}
|
||||
timeSpent: {fileID: 77614869}
|
||||
--- !u!4 &118887550
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 118887548}
|
||||
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: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &301088547
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -460,6 +405,7 @@ GameObject:
|
||||
- component: {fileID: 301088548}
|
||||
- component: {fileID: 301088550}
|
||||
- component: {fileID: 301088549}
|
||||
- component: {fileID: 301088551}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
@@ -480,12 +426,12 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2145235736}
|
||||
- {fileID: 414055543}
|
||||
- {fileID: 1493108463}
|
||||
- {fileID: 378145455}
|
||||
- {fileID: 1343151409}
|
||||
- {fileID: 1813638489}
|
||||
- {fileID: 409590586}
|
||||
- {fileID: 1335886460}
|
||||
m_Father: {fileID: 1559094126}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -532,6 +478,32 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 301088547}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &301088551
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 301088547}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b3f784c065813a4a8364b1299284816, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
webcamDisplay: {fileID: 378145456}
|
||||
feedback: {fileID: 409590587}
|
||||
feedbackPopup: {fileID: 1374011069}
|
||||
dynamic: {fileID: 1523390682}
|
||||
player: {fileID: 993952931}
|
||||
button: {fileID: 1159630774}
|
||||
pauseSprite: {fileID: 21300000, guid: 43db869a07cf51f45a411b6e4a417743, type: 3}
|
||||
wordImage: {fileID: 2145235737}
|
||||
title: {fileID: 388014849}
|
||||
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
|
||||
courselist: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2}
|
||||
ResultPanel: {fileID: 1383144366}
|
||||
CoursesButton: {fileID: 839294691}
|
||||
timeSpent: {fileID: 77614869}
|
||||
--- !u!1 &361280475
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -749,7 +721,7 @@ GameObject:
|
||||
- component: {fileID: 378145457}
|
||||
- component: {fileID: 378145456}
|
||||
m_Layer: 5
|
||||
m_Name: Webcam-bg
|
||||
m_Name: Webcam Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -768,7 +740,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -822,7 +794,7 @@ GameObject:
|
||||
- component: {fileID: 388014850}
|
||||
- component: {fileID: 388014849}
|
||||
m_Layer: 5
|
||||
m_Name: title
|
||||
m_Name: Title
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -960,7 +932,7 @@ GameObject:
|
||||
- component: {fileID: 409590588}
|
||||
- component: {fileID: 409590587}
|
||||
m_Layer: 5
|
||||
m_Name: Test-feedback-button
|
||||
m_Name: Feedback Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -980,7 +952,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1138468890}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -1031,9 +1003,9 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1485779445}
|
||||
m_TargetAssemblyTypeName: Webcam, Assembly-CSharp
|
||||
m_MethodName: Show_feedback
|
||||
- m_Target: {fileID: 301088551}
|
||||
m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp
|
||||
m_MethodName: ShowFeedback
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
@@ -1081,140 +1053,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 409590585}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &414055542
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 414055543}
|
||||
- component: {fileID: 414055546}
|
||||
- component: {fileID: 414055545}
|
||||
- component: {fileID: 414055544}
|
||||
m_Layer: 5
|
||||
m_Name: Courses
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &414055543
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 414055542}
|
||||
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: 1785847568}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 234, y: -60}
|
||||
m_SizeDelta: {x: 480.0704, y: 99.1845}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &414055544
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 414055542}
|
||||
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: 414055545}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1485779445}
|
||||
m_TargetAssemblyTypeName: Webcam, Assembly-CSharp
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 5
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument: CoursesScreen
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &414055545
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 414055542}
|
||||
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: 0}
|
||||
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: 10917, 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 &414055546
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 414055542}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &519420028
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1518,13 +1356,13 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 0}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName:
|
||||
- m_Target: {fileID: 301088551}
|
||||
m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp
|
||||
m_MethodName: Back
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName:
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
@@ -2130,7 +1968,7 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 118887549}
|
||||
- m_Target: {fileID: 0}
|
||||
m_TargetAssemblyTypeName: StartPause, Assembly-CSharp
|
||||
m_MethodName: Pause
|
||||
m_Mode: 1
|
||||
@@ -2256,6 +2094,120 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1300721216}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1001 &1335886459
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 301088548}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 301088551}
|
||||
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: Back
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: TemplateCourse, Assembly-CSharp
|
||||
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: 6
|
||||
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 &1335886460 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
m_PrefabInstance: {fileID: 1335886459}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1343151408
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2269,7 +2221,7 @@ GameObject:
|
||||
- component: {fileID: 1343151411}
|
||||
- component: {fileID: 1343151410}
|
||||
m_Layer: 5
|
||||
m_Name: Change-cam
|
||||
m_Name: Change Webcam Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -2289,7 +2241,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1898926705}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -2340,8 +2292,8 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1485779445}
|
||||
m_TargetAssemblyTypeName: Webcam, Assembly-CSharp
|
||||
- m_Target: {fileID: 301088551}
|
||||
m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp
|
||||
m_MethodName: SwapCam
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
@@ -2402,7 +2354,7 @@ GameObject:
|
||||
- component: {fileID: 1374011072}
|
||||
- component: {fileID: 1374011071}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_Name: Feedback
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -2701,54 +2653,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1427866734}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1485779444
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1485779446}
|
||||
- component: {fileID: 1485779445}
|
||||
m_Layer: 0
|
||||
m_Name: Webcam-controller
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1485779445
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1485779444}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a85f8bd9399680347b4be72850a56fcf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
display: {fileID: 378145456}
|
||||
feedback: {fileID: 409590587}
|
||||
popup: {fileID: 1374011069}
|
||||
dynamic: {fileID: 1523390682}
|
||||
--- !u!4 &1485779446
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1485779444}
|
||||
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 &1493108462
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2761,7 +2665,7 @@ GameObject:
|
||||
- component: {fileID: 1493108465}
|
||||
- component: {fileID: 1493108464}
|
||||
m_Layer: 5
|
||||
m_Name: video-bg
|
||||
m_Name: Video Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -2781,7 +2685,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1159630773}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -3199,141 +3103,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1773033262}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1785847567
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1785847568}
|
||||
- component: {fileID: 1785847570}
|
||||
- component: {fileID: 1785847569}
|
||||
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 &1785847568
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1785847567}
|
||||
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: 414055543}
|
||||
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.00024414062}
|
||||
m_SizeDelta: {x: 0, y: 0.00048828}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1785847569
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1785847567}
|
||||
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: < Back to courses
|
||||
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: 48
|
||||
m_fontSizeBase: 48
|
||||
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 &1785847570
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1785847567}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1813638488
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3347,7 +3116,7 @@ GameObject:
|
||||
- component: {fileID: 1813638491}
|
||||
- component: {fileID: 1813638490}
|
||||
m_Layer: 5
|
||||
m_Name: Next-sign-button
|
||||
m_Name: Next Sign Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -3367,7 +3136,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1427866735}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -3418,8 +3187,8 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 118887549}
|
||||
m_TargetAssemblyTypeName: StartPause, Assembly-CSharp
|
||||
- m_Target: {fileID: 301088551}
|
||||
m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp
|
||||
m_MethodName: NextSign
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
@@ -3617,7 +3386,7 @@ GameObject:
|
||||
- component: {fileID: 2145235738}
|
||||
- component: {fileID: 2145235737}
|
||||
m_Layer: 5
|
||||
m_Name: Tutorial-image-bg
|
||||
m_Name: Learnable Sprite
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae746f332e314e84c9df74b892c75d4d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -5,11 +5,39 @@ using UnityEngine.UI;
|
||||
using UnityEngine.Video;
|
||||
|
||||
/// <summary>
|
||||
/// This class is responsible for loading all data from the Course-scriptableobject.
|
||||
/// Specifically it fetches and displays the correct title, videos and images while also keeping track of the progress.
|
||||
/// TemplateCourse scene manager
|
||||
/// </summary>
|
||||
public class StartPause : MonoBehaviour
|
||||
public class TemplateCourse : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Index to indicate which camera is being used
|
||||
/// </summary>
|
||||
private int camdex = 0;
|
||||
|
||||
/// <summary>
|
||||
/// This texture is used as an intermidiary between the camera output and the display image
|
||||
/// </summary>
|
||||
private WebCamTexture tex;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the RawImage that will display the video
|
||||
/// </summary>
|
||||
public RawImage webcamDisplay;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the button that is currently used to test the feedback-display
|
||||
/// </summary>
|
||||
public Button feedback;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the PANEL that holds the feedbackwindow
|
||||
/// </summary>
|
||||
public GameObject feedbackPopup;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the textfield that holds the part of the feedback-window that will change: bad/good/excellent
|
||||
/// </summary>
|
||||
public TMP_Text dynamic;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to instructional video player
|
||||
@@ -19,22 +47,21 @@ public class StartPause : MonoBehaviour
|
||||
/// Reference to pause button
|
||||
/// </summary>
|
||||
public Button button;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to sprite for the pause button
|
||||
/// </summary>
|
||||
public Sprite pauseSprite;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the image for displaying the current words sprite
|
||||
/// </summary>
|
||||
public Image wordImage;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the text object for displaying the current word
|
||||
/// </summary>
|
||||
public TextMeshProUGUI title;
|
||||
|
||||
public TMP_Text title;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to user list to get current user
|
||||
@@ -45,29 +72,27 @@ public class StartPause : MonoBehaviour
|
||||
/// The current user
|
||||
/// </summary>
|
||||
private User user;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Current user progress for this course
|
||||
/// </summary>
|
||||
private Progress progress = null;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ScriptableObject with list of all courses
|
||||
/// </summary>
|
||||
public CourseList courselist;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to Course ScriptableObject
|
||||
/// </summary>
|
||||
private Course course;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Index of the current word/letter in the course.learnables list
|
||||
/// </summary>
|
||||
private int currentWordIndex = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This holds the amount of words in the course
|
||||
/// </summary>
|
||||
@@ -89,11 +114,6 @@ public class StartPause : MonoBehaviour
|
||||
/// </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>
|
||||
@@ -102,16 +122,28 @@ public class StartPause : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Reference to the timeSpent UI
|
||||
/// </summary>
|
||||
public TextMeshProUGUI timeSpent;
|
||||
public TMP_Text timeSpent;
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the script is initialised.
|
||||
/// It inactivatis the popup, finds a webcam to use and links it via the WebcamTexture to the display RawImage.
|
||||
/// It takes the correct course from the courselist, using the courseIndex.
|
||||
/// Then it checks whether or not the User has started the course yet, to possibly create a new progress atribute for the course.
|
||||
/// Then it sets up the course-screen to display relevant information from the course-scriptable.
|
||||
/// </summary>
|
||||
public void Awake()
|
||||
void Awake()
|
||||
{
|
||||
// Setting up Webcam
|
||||
feedbackPopup.SetActive(false);
|
||||
if (WebCamTexture.devices.Length > 0)
|
||||
{
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
tex = new WebCamTexture(device.name);
|
||||
webcamDisplay.texture = tex;
|
||||
|
||||
tex.Play();
|
||||
}
|
||||
|
||||
// Setting up course
|
||||
course = courselist.courses[courselist.currentCourseIndex];
|
||||
maxWords = course.learnables.Count;
|
||||
@@ -140,7 +172,6 @@ public class StartPause : MonoBehaviour
|
||||
startMoment = DateTime.Now;
|
||||
}
|
||||
|
||||
// These two functions generate video and image from files
|
||||
/// <summary>
|
||||
/// This function uses the word_i integer to grab the correct video from the course.learnabels.
|
||||
/// When it has this video, it will load it into the videoplayer and set it to start.
|
||||
@@ -190,7 +221,6 @@ public class StartPause : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Press next-sign button for next word
|
||||
/// <summary>
|
||||
/// This function is called when the next-sign button is pressed.
|
||||
/// It increased the wordindex and fetches new videos/images if index<max, because then the coure is not fincished yet.
|
||||
@@ -222,7 +252,6 @@ public class StartPause : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// finishcourse is called to save the "finished" progress to the user.
|
||||
/// </summary>
|
||||
@@ -236,10 +265,78 @@ public class StartPause : MonoBehaviour
|
||||
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"); });
|
||||
CoursesButton.onClick.AddListener(() => { SystemController.GetInstance().BackToPreviousScene(); });
|
||||
|
||||
progress.AddOrUpdate<float>("courseProgress", 1f);
|
||||
userList.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// So long as there are cameras to use, you swap the camera you are using to another in the list.
|
||||
/// </summary>
|
||||
public void SwapCam()
|
||||
{
|
||||
if (WebCamTexture.devices.Length > 0)
|
||||
{
|
||||
// Stop the old camera
|
||||
// If there was no camera playing before, then you dont have to reset the texture, as it wasn't assigned in the first place.
|
||||
if (tex.isPlaying)
|
||||
{
|
||||
webcamDisplay.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
}
|
||||
// Find the new camera
|
||||
camdex += 1;
|
||||
camdex %= WebCamTexture.devices.Length;
|
||||
// Start the new camera
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
tex = new WebCamTexture(device.name);
|
||||
webcamDisplay.texture = tex;
|
||||
|
||||
tex.Play();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The normal sceneChanger cannot be used here since the camera also needs to be stopped.
|
||||
/// This extra functionality is implemented in this function
|
||||
/// </summary>
|
||||
/// <param name="sceneName"> The path for the scene you want to travel to, assuming root-directory is Assets</param>
|
||||
public void Back()
|
||||
{
|
||||
webcamDisplay.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function toggles between inactivity and activity for the popup panel.
|
||||
/// This will be changed later when the model gets integrated, probably being timed to dissapear.
|
||||
/// </summary>
|
||||
public void ShowFeedback()
|
||||
{
|
||||
if (feedbackPopup.activeSelf)
|
||||
{
|
||||
dynamic.text = "";
|
||||
feedbackPopup.SetActive(false);
|
||||
return;
|
||||
}
|
||||
double index = UnityEngine.Random.value;
|
||||
if (index < 0.5)
|
||||
{
|
||||
dynamic.text = "Poor";
|
||||
}
|
||||
else if (index > 0.8)
|
||||
{
|
||||
dynamic.text = "Excellent";
|
||||
}
|
||||
else
|
||||
{
|
||||
dynamic.text = "Good";
|
||||
}
|
||||
feedbackPopup.SetActive(true);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a85f8bd9399680347b4be72850a56fcf
|
||||
guid: 6b3f784c065813a4a8364b1299284816
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,128 +0,0 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// This class is dedicated to the camera and other actions that later could be connected to it, like the feedback.
|
||||
/// It is responsible for finding working cameras, displaying them and being able to toggle between them.
|
||||
/// This class also holds temporary code to display feedback via a button.
|
||||
/// </summary>
|
||||
public class Webcam : MonoBehaviour
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Index to indicate which camera is being used
|
||||
/// </summary>
|
||||
int camdex = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This texture is used as an intermidiary between the camera output and the display image
|
||||
/// </summary>
|
||||
WebCamTexture tex;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the RawImage that will display the video
|
||||
/// </summary>
|
||||
public RawImage display;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the button that is currently used to test the feedback-display
|
||||
/// </summary>
|
||||
public Button feedback;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the PANEL that holds the feedbackwindow
|
||||
/// </summary>
|
||||
public GameObject popup;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the textfield that holds the part of the feedback-window that will change: bad/good/excellent
|
||||
/// </summary>
|
||||
public TextMeshProUGUI dynamic;
|
||||
|
||||
/// <summary>
|
||||
/// This function is called at the start of the frame.
|
||||
/// It inactivatis the popup, finds a webcam to use and links it via the WebcamTexture to the display RawImage.
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
popup.SetActive(false);
|
||||
if (WebCamTexture.devices.Length > 0) {
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
tex = new WebCamTexture(device.name);
|
||||
display.texture = tex;
|
||||
|
||||
tex.Play();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// So long as there are cameras to use, you swap the camera you are using to another in the list.
|
||||
/// </summary>
|
||||
public void SwapCam()
|
||||
{
|
||||
if (WebCamTexture.devices.Length > 0)
|
||||
{
|
||||
// Stop the old camera
|
||||
// If there was no camera playing before, then you dont have to reset the texture, as it wasn't assigned in the first place.
|
||||
if (tex.isPlaying) {
|
||||
display.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
}
|
||||
// Find the new camera
|
||||
camdex += 1;
|
||||
camdex %= WebCamTexture.devices.Length;
|
||||
// Start the new camera
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
tex = new WebCamTexture(device.name);
|
||||
display.texture = tex;
|
||||
|
||||
tex.Play();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The normal sceneChanger cannot be used here since the camera also needs to be stopped.
|
||||
/// This extra functionality is implemented in this function
|
||||
/// </summary>
|
||||
/// <param name="sceneName"> The path for the scene you want to travel to, assuming root-directory is Assets</param>
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
display.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function toggles between inactivity and activity for the popup panel.
|
||||
/// This will be changed later when the model gets integrated, probably being timed to dissapear.
|
||||
/// </summary>
|
||||
public void Show_feedback()
|
||||
{
|
||||
if (popup.activeSelf)
|
||||
{
|
||||
dynamic.text = "";
|
||||
popup.SetActive(false);
|
||||
return;
|
||||
}
|
||||
double index = UnityEngine.Random.value;
|
||||
if (index < 0.5)
|
||||
{
|
||||
dynamic.text = "Poor";
|
||||
}
|
||||
else if (index > 0.8)
|
||||
{
|
||||
dynamic.text = "Excellent";
|
||||
}
|
||||
else
|
||||
{
|
||||
dynamic.text = "Good";
|
||||
}
|
||||
popup.SetActive(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user