Add mouse indicator in UI

This commit is contained in:
Jens Pitkänen 2020-04-20 00:34:30 +03:00
parent ad6bb8ba22
commit abdab9d018
5 changed files with 353 additions and 121 deletions

View File

@ -0,0 +1,203 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3790132179117037925
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 496226192425631366}
- component: {fileID: 4154824701815903788}
- component: {fileID: 444296744267565509}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &496226192425631366
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3790132179117037925}
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: []
m_Father: {fileID: 7049769128174869205}
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: 48, y: 48}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &4154824701815903788
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3790132179117037925}
m_CullTransparentMesh: 0
--- !u!114 &444296744267565509
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3790132179117037925}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: 8d66e65c66e29504199ed664979682cd, type: 2}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 3286163911610860551, guid: d936baad8aa2f5743a901f6aa79cac72,
type: 3}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7049769127320404023
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7049769127320404016}
- component: {fileID: 7049769127320404017}
m_Layer: 5
m_Name: Pickup Indicator
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7049769127320404016
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7049769127320404023}
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: 7049769128174869205}
m_Father: {fileID: 0}
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: -100}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!225 &7049769127320404017
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7049769127320404023}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 0
m_BlocksRaycasts: 0
m_IgnoreParentGroups: 0
--- !u!1 &7049769128174869204
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7049769128174869205}
- component: {fileID: 7049769128174869207}
- component: {fileID: 7049769128174869206}
m_Layer: 5
m_Name: Pickup Indicator Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7049769128174869205
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7049769128174869204}
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: 496226192425631366}
m_Father: {fileID: 7049769127320404016}
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: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7049769128174869207
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7049769128174869204}
m_CullTransparentMesh: 0
--- !u!114 &7049769128174869206
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7049769128174869204}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8301887, g: 0.8301887, b: 0.8301887, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: a0bb3d007c7133149bd1682bd93b776f, type: 3}
m_FontSize: 28
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Take stick

View File

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

View File

@ -2931,55 +2931,18 @@ RectTransform:
type: 3}
m_PrefabInstance: {fileID: 5400695019531174117}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1364366411
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1364366412}
- component: {fileID: 1364366413}
m_Layer: 5
m_Name: Pickup Indicator
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1364366412
--- !u!224 &1364366412 stripped
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
m_PrefabInstance: {fileID: 7049769128673956988}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1364366411}
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: 1849724585}
m_Father: {fileID: 1921606960}
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: -100}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!225 &1364366413
--- !u!225 &1364366413 stripped
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 7049769127320404017, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
m_PrefabInstance: {fileID: 7049769128673956988}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1364366411}
m_Enabled: 1
m_Alpha: 0
m_Interactable: 0
m_BlocksRaycasts: 0
m_IgnoreParentGroups: 0
--- !u!1 &1432870191
GameObject:
m_ObjectHideFlags: 0
@ -4512,83 +4475,18 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1780719156}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1849724584
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1849724585}
- component: {fileID: 1849724587}
- component: {fileID: 1849724586}
m_Layer: 5
m_Name: Pickup Indicator Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1849724585
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1849724584}
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: []
m_Father: {fileID: 1364366412}
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: 300, y: 200}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1849724586
--- !u!114 &1849724586 stripped
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 7049769128174869206, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
m_PrefabInstance: {fileID: 7049769128673956988}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1849724584}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8301887, g: 0.8301887, b: 0.8301887, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 28
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Take stick
--- !u!222 &1849724587
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1849724584}
m_CullTransparentMesh: 0
--- !u!1001 &1863830598
PrefabInstance:
m_ObjectHideFlags: 0
@ -5790,3 +5688,127 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8cf3939d3cb6e684c8ac9618e68c8259, type: 3}
--- !u!1001 &7049769128673956988
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1921606960}
m_Modifications:
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -100
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404016, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404017, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_Alpha
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7049769127320404023, guid: 4960008b98feac24dbe12ba22a64b125,
type: 3}
propertyPath: m_Name
value: Pickup Indicator
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4960008b98feac24dbe12ba22a64b125, type: 3}

View File

@ -8,7 +8,7 @@ ScriptedImporter:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3}
svgType: 0
svgType: 1
texturedSpriteMeshType: 0
svgPixelsPerUnit: 60
gradientResolution: 64
@ -28,10 +28,10 @@ ScriptedImporter:
maxTangentAngleEnabled: 0
maxTangentAngle: 5
keepTextureAspectRatio: 1
textureSize: 256
textureSize: 64
textureWidth: 256
textureHeight: 256
wrapMode: 0
wrapMode: 1
filterMode: 1
sampleCount: 4
preserveSVGImageAspect: 0

View File

@ -8,7 +8,7 @@ ScriptedImporter:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3}
svgType: 0
svgType: 1
texturedSpriteMeshType: 0
svgPixelsPerUnit: 100
gradientResolution: 64
@ -28,10 +28,10 @@ ScriptedImporter:
maxTangentAngleEnabled: 0
maxTangentAngle: 5
keepTextureAspectRatio: 1
textureSize: 256
textureSize: 64
textureWidth: 256
textureHeight: 256
wrapMode: 0
wrapMode: 1
filterMode: 1
sampleCount: 4
preserveSVGImageAspect: 0