Optimize eye tracking

This commit is contained in:
CroakFang
2022-11-04 21:01:42 +08:00
parent 472cdb62ed
commit 2e98156a00
5 changed files with 164 additions and 156 deletions
+135 -152
View File
@@ -1452,7 +1452,7 @@ RectTransform:
- {fileID: 1946133108} - {fileID: 1946133108}
- {fileID: 844924682} - {fileID: 844924682}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 19 m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -4339,7 +4339,7 @@ RectTransform:
- {fileID: 2094428666} - {fileID: 2094428666}
- {fileID: 18660879} - {fileID: 18660879}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 21 m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -6044,7 +6044,7 @@ RectTransform:
- {fileID: 292348636} - {fileID: 292348636}
- {fileID: 994851659} - {fileID: 994851659}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 9 m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -8619,7 +8619,6 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 482905334} - component: {fileID: 482905334}
- component: {fileID: 482905336} - component: {fileID: 482905336}
- component: {fileID: 482905335}
m_Layer: 5 m_Layer: 5
m_Name: DynamicBone m_Name: DynamicBone
m_TagString: Untagged m_TagString: Untagged
@@ -8639,44 +8638,14 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 845364685} - {fileID: 845364685}
m_Father: {fileID: 1704906816} m_Father: {fileID: 548276324}
m_RootOrder: 4 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} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 283, y: -75}
m_SizeDelta: {x: 0, y: 50} m_SizeDelta: {x: 283, y: 50}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &482905335
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 482905333}
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.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: 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 &482905336 --- !u!222 &482905336
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -10094,6 +10063,84 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Padding: {x: -8, y: -5, z: -8, w: -5} m_Padding: {x: -8, y: -5, z: -8, w: -5}
m_Softness: {x: 0, y: 0} m_Softness: {x: 0, y: 0}
--- !u!1 &548276323
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 548276324}
- component: {fileID: 548276326}
- component: {fileID: 548276325}
m_Layer: 5
m_Name: ModelSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &548276324
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 548276323}
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_Children:
- {fileID: 1798338064}
- {fileID: 482905334}
- {fileID: 1333306137}
m_Father: {fileID: 1704906816}
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: 200}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &548276325
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 548276323}
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.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: 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 &548276326
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 548276323}
m_CullTransparentMesh: 1
--- !u!1 &548963527 --- !u!1 &548963527
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -11005,7 +11052,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1400934330} - {fileID: 1400934330}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 10 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -13182,7 +13229,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1887819554} - {fileID: 1887819554}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 13 m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -14849,7 +14896,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1323454211} - {fileID: 1323454211}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 22 m_RootOrder: 20
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -16203,7 +16250,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 992041010} - {fileID: 992041010}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 6 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -18413,7 +18460,7 @@ MonoBehaviour:
m_MethodName: ToggleUIPanel m_MethodName: ToggleUIPanel
m_Mode: 2 m_Mode: 2
m_Arguments: m_Arguments:
m_ObjectArgument: {fileID: 1798338063} m_ObjectArgument: {fileID: 548276323}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0 m_IntArgument: 0
m_FloatArgument: 0 m_FloatArgument: 0
@@ -19172,7 +19219,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1296918362} - {fileID: 1296918362}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 18 m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -20415,7 +20462,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1882365342} m_HandleRect: {fileID: 1882365342}
m_Direction: 2 m_Direction: 2
m_Value: 1 m_Value: 1
m_Size: 0.9254385 m_Size: 0.88527817
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@@ -20490,7 +20537,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 494042607} - {fileID: 494042607}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 16 m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -20835,7 +20882,7 @@ RectTransform:
- {fileID: 916764976} - {fileID: 916764976}
- {fileID: 1385563000} - {fileID: 1385563000}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 7 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -22714,7 +22761,6 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 1333306137} - component: {fileID: 1333306137}
- component: {fileID: 1333306139} - component: {fileID: 1333306139}
- component: {fileID: 1333306138}
m_Layer: 5 m_Layer: 5
m_Name: EarMoprh m_Name: EarMoprh
m_TagString: Untagged m_TagString: Untagged
@@ -22734,44 +22780,14 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1252885464} - {fileID: 1252885464}
m_Father: {fileID: 1704906816} m_Father: {fileID: 548276324}
m_RootOrder: 5 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 283, y: -125}
m_SizeDelta: {x: 0, y: 50} m_SizeDelta: {x: 283, y: 50}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1333306138
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1333306136}
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.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: 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 &1333306139 --- !u!222 &1333306139
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -22850,7 +22866,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1104495875} - {fileID: 1104495875}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 14 m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -23307,7 +23323,7 @@ RectTransform:
- {fileID: 1590756440} - {fileID: 1590756440}
- {fileID: 1862189160} - {fileID: 1862189160}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 23 m_RootOrder: 21
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -24555,7 +24571,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 787741672} - {fileID: 787741672}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 20 m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -28032,7 +28048,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 2016037558} - {fileID: 2016037558}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 12 m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -29022,9 +29038,7 @@ RectTransform:
- {fileID: 991136000} - {fileID: 991136000}
- {fileID: 6878219666121841224} - {fileID: 6878219666121841224}
- {fileID: 1046617015} - {fileID: 1046617015}
- {fileID: 1798338064} - {fileID: 548276324}
- {fileID: 482905334}
- {fileID: 1333306137}
- {fileID: 893956225} - {fileID: 893956225}
- {fileID: 1209823365} - {fileID: 1209823365}
- {fileID: 2091332066} - {fileID: 2091332066}
@@ -29123,7 +29137,7 @@ RectTransform:
- {fileID: 1408642259} - {fileID: 1408642259}
- {fileID: 1525688469} - {fileID: 1525688469}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 11 m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -30312,7 +30326,6 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 1798338064} - component: {fileID: 1798338064}
- component: {fileID: 1798338066} - component: {fileID: 1798338066}
- component: {fileID: 1798338065}
m_Layer: 5 m_Layer: 5
m_Name: LockChara m_Name: LockChara
m_TagString: Untagged m_TagString: Untagged
@@ -30332,44 +30345,14 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1364855926} - {fileID: 1364855926}
m_Father: {fileID: 1704906816} m_Father: {fileID: 548276324}
m_RootOrder: 3 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 283, y: -25}
m_SizeDelta: {x: 0, y: 50} m_SizeDelta: {x: 283, y: 50}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1798338065
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1798338063}
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.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: 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 &1798338066 --- !u!222 &1798338066
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -34210,7 +34193,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1139092354} - {fileID: 1139092354}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 8 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -35277,7 +35260,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 17 m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -35527,7 +35510,7 @@ RectTransform:
- {fileID: 542685196} - {fileID: 542685196}
- {fileID: 964213176} - {fileID: 964213176}
m_Father: {fileID: 1704906816} m_Father: {fileID: 1704906816}
m_RootOrder: 15 m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
@@ -35857,9 +35840,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896} m_Father: {fileID: 6878219667498913896}
m_RootOrder: 5 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 106.5, y: -286}
m_SizeDelta: {x: 180, y: 20} m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219665895574065 --- !u!114 &6878219665895574065
@@ -36365,9 +36348,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896} m_Father: {fileID: 6878219667498913896}
m_RootOrder: 1 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} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 106.5, y: -57.2}
m_SizeDelta: {x: 180, y: 20} m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219666109573094 --- !u!114 &6878219666109573094
@@ -38722,9 +38705,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896} m_Father: {fileID: 6878219667498913896}
m_RootOrder: 3 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 106.5, y: -171.6}
m_SizeDelta: {x: 180, y: 20} m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219666841734894 --- !u!114 &6878219666841734894
@@ -39553,9 +39536,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896} m_Father: {fileID: 6878219667498913896}
m_RootOrder: 4 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 106.5, y: -228.8}
m_SizeDelta: {x: 180, y: 20} m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219667203546886 --- !u!114 &6878219667203546886
@@ -41265,9 +41248,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896} m_Father: {fileID: 6878219667498913896}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 106.5, y: 0}
m_SizeDelta: {x: 180, y: 20} m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219667749320559 --- !u!114 &6878219667749320559
@@ -41485,9 +41468,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896} m_Father: {fileID: 6878219667498913896}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 106.5, y: -114.4}
m_SizeDelta: {x: 180, y: 20} m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!1 &6878219667784581358 --- !u!1 &6878219667784581358
+7 -3
View File
@@ -27,6 +27,7 @@ public class UmaContainer : MonoBehaviour
public GameObject HeadBone; public GameObject HeadBone;
public GameObject TrackTarget; public GameObject TrackTarget;
public float EyeHeight; public float EyeHeight;
public bool EnableEyeTracking = true;
[Header("Generic")] [Header("Generic")]
public bool IsGeneric = false; public bool IsGeneric = false;
@@ -135,12 +136,15 @@ public class UmaContainer : MonoBehaviour
private void FixedUpdate() private void FixedUpdate()
{ {
if (TrackTarget&&!isAnimatorControl&&!IsMini) if (TrackTarget&& EnableEyeTracking && !IsMini)
{ {
var targetPosotion = TrackTarget.transform.position - HeadBone.transform.up*EyeHeight; var targetPosotion = TrackTarget.transform.position - HeadBone.transform.up*EyeHeight;
var deltaPos = HeadBone.transform.InverseTransformPoint(targetPosotion); var deltaPos = HeadBone.transform.InverseTransformPoint(targetPosotion);
var deltaRotation = HeadBone.transform.InverseTransformDirection(deltaPos.normalized); var deltaRotation = Quaternion.LookRotation(deltaPos.normalized, HeadBone.transform.up).eulerAngles;
var finalRotation = new Vector2(Mathf.Clamp(deltaRotation.x / 0.86f,-1,1), Mathf.Clamp(deltaRotation.y / 0.66f, -1, 1));//Limited to the angle of view if (deltaRotation.x > 180) deltaRotation.x -= 360;
if (deltaRotation.y > 180) deltaRotation.y -= 360;
var finalRotation = new Vector2(Mathf.Clamp(deltaRotation.y / 35,-1,1), Mathf.Clamp(-deltaRotation.x / 25, -1, 1));//Limited to the angle of view
FaceDrivenKeyTarget.SetEyeRange(finalRotation.x, finalRotation.y, finalRotation.x, -finalRotation.y); FaceDrivenKeyTarget.SetEyeRange(finalRotation.x, finalRotation.y, finalRotation.x, -finalRotation.y);
} }
+3
View File
@@ -960,6 +960,7 @@ public class UmaViewerBuilder : MonoBehaviour
CurrentUMAContainer.UmaAnimator.SetTrigger(needTransit ? "next_s" : "next"); CurrentUMAContainer.UmaAnimator.SetTrigger(needTransit ? "next_s" : "next");
CurrentUMAContainer.isAnimatorControl = false; CurrentUMAContainer.isAnimatorControl = false;
CurrentUMAContainer.TrackTarget = Camera.main.gameObject;
} }
else if (clip.name.Contains("face")) else if (clip.name.Contains("face"))
{ {
@@ -1004,6 +1005,7 @@ public class UmaViewerBuilder : MonoBehaviour
} }
CurrentUMAContainer.UmaAnimator.Play("motion_2", 0, 0); CurrentUMAContainer.UmaAnimator.Play("motion_2", 0, 0);
CurrentUMAContainer.OverrideController["clip_2"].wrapMode = WrapMode.Loop; CurrentUMAContainer.OverrideController["clip_2"].wrapMode = WrapMode.Loop;
CurrentUMAContainer.TrackTarget = PreviewCamera.gameObject;
} }
else else
{ {
@@ -1012,6 +1014,7 @@ public class UmaViewerBuilder : MonoBehaviour
CurrentUMAContainer.FaceDrivenKeyTarget.ResetLocator(); CurrentUMAContainer.FaceDrivenKeyTarget.ResetLocator();
} }
CurrentUMAContainer.isAnimatorControl = false; CurrentUMAContainer.isAnimatorControl = false;
CurrentUMAContainer.TrackTarget = Camera.main.gameObject;
SetPreviewCamera(null); SetPreviewCamera(null);
CurrentUMAContainer.UmaAnimator.Play("motion_1", 0, lastTime); CurrentUMAContainer.UmaAnimator.Play("motion_1", 0, lastTime);
+8
View File
@@ -624,6 +624,14 @@ public class UmaViewerUI : MonoBehaviour
} }
} }
public void SetEyeTrackingEnable(bool isOn)
{
if (Builder.CurrentUMAContainer)
{
Builder.CurrentUMAContainer.EnableEyeTracking = isOn;
}
}
public void ClearCache() public void ClearCache()
{ {
PlayerPrefs.DeleteAll(); PlayerPrefs.DeleteAll();
@@ -305,7 +305,17 @@ namespace Gallop
}); });
EyeMorphs.ForEach(morph => EyeMorphs.ForEach(morph =>
{ {
morph.weight = morph.locator.transform.localPosition.x * -100; if (morph == LeftEyeXrange || morph == LeftEyeYrange || morph == RightEyeXrange || morph == RightEyeYrange)
{
if (!Container.EnableEyeTracking)
{
morph.weight = morph.locator.transform.localPosition.x * -100;
}
}
else
{
morph.weight = morph.locator.transform.localPosition.x * -100;
}
}); });
MouthMorphs.ForEach(morph => MouthMorphs.ForEach(morph =>
{ {