From 7abd60baf1d0d1bfa8d13bbce4e9927b1a8bcde6 Mon Sep 17 00:00:00 2001 From: Vova Date: Mon, 3 Apr 2023 15:13:02 +0300 Subject: [PATCH] fix ui size --- Assets/Prefabs/TestPack.prefab | 3 +- Assets/Prefabs/UI/JobItemUiTemplate.prefab | 31 ++++++++--- Assets/Prefabs/UI/JobSelectorUI.prefab | 60 ++++++++++++++-------- Assets/Scenes/House.unity | 28 ++++++++-- 4 files changed, 89 insertions(+), 33 deletions(-) diff --git a/Assets/Prefabs/TestPack.prefab b/Assets/Prefabs/TestPack.prefab index 79fec827..751a0996 100644 --- a/Assets/Prefabs/TestPack.prefab +++ b/Assets/Prefabs/TestPack.prefab @@ -469,7 +469,7 @@ MonoBehaviour: m_VertexBufferAutoSizeReduction: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 - m_margin: {x: 0.4031067, y: 1.8140259, z: 0, w: 1.6123657} + m_margin: {x: 0.4031067, y: 1.8140259, z: -131.59557, w: 1.6123657} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_hasFontAssetChanged: 0 @@ -1896,6 +1896,7 @@ MonoBehaviour: m_EditorClassIdentifier: _timeSliderPrefab: {fileID: 5407876737168081677, guid: 15f8d2a34d602b04c9694f4eea8948d3, type: 3} + _jobSelectorPrefab: {fileID: 0} _blurOverlay: {fileID: 1972616679782764642} --- !u!1 &7134430132852475238 GameObject: diff --git a/Assets/Prefabs/UI/JobItemUiTemplate.prefab b/Assets/Prefabs/UI/JobItemUiTemplate.prefab index 4b648a93..27cc26fb 100644 --- a/Assets/Prefabs/UI/JobItemUiTemplate.prefab +++ b/Assets/Prefabs/UI/JobItemUiTemplate.prefab @@ -11,6 +11,7 @@ GameObject: - component: {fileID: 4104292198911527695} - component: {fileID: 930127345241834450} - component: {fileID: 3870220567668916177} + - component: {fileID: 75572033310572652} m_Layer: 5 m_Name: Description m_TagString: Untagged @@ -35,8 +36,8 @@ RectTransform: 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: 283.54, y: 64} + m_AnchoredPosition: {x: 239.4, y: 0} + m_SizeDelta: {x: 0, y: 64} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &930127345241834450 CanvasRenderer: @@ -93,8 +94,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 24 - m_fontSizeBase: 24 + m_fontSize: 28 + m_fontSizeBase: 28 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -135,6 +136,20 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &75572033310572652 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1402130886854618066} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 2 + m_VerticalFit: 0 --- !u!1 &3310662501840371697 GameObject: m_ObjectHideFlags: 0 @@ -163,7 +178,7 @@ RectTransform: m_GameObject: {fileID: 3310662501840371697} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.47592998, y: 0.47592998, z: 0.47592998} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 7254749674437777779} @@ -196,8 +211,8 @@ MonoBehaviour: m_Spacing: 10 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 0 - m_ChildControlHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 m_ChildScaleWidth: 1 m_ChildScaleHeight: 1 m_ReverseArrangement: 0 @@ -406,7 +421,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 197.17, y: 0} + m_AnchoredPosition: {x: 220.79999, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6626853770728912630 diff --git a/Assets/Prefabs/UI/JobSelectorUI.prefab b/Assets/Prefabs/UI/JobSelectorUI.prefab index 59304a11..cf00e49d 100644 --- a/Assets/Prefabs/UI/JobSelectorUI.prefab +++ b/Assets/Prefabs/UI/JobSelectorUI.prefab @@ -112,7 +112,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 136.515, y: 0} + m_AnchoredPosition: {x: 155.935, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8491863560958911165 @@ -170,8 +170,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 24 - m_fontSizeBase: 24 + m_fontSize: 28 + m_fontSizeBase: 28 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -264,8 +264,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 136.515, y: 0} - m_SizeDelta: {x: 273.03, y: 0} + m_AnchoredPosition: {x: 155.935, y: 0} + m_SizeDelta: {x: 311.87, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &5677520149483722787 MonoBehaviour: @@ -381,7 +381,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 42.16, y: 0} + m_AnchoredPosition: {x: 45.855, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3221867121941074007 @@ -439,8 +439,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 24 - m_fontSizeBase: 24 + m_fontSize: 28 + m_fontSizeBase: 28 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -686,8 +686,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 136.515, y: 0} - m_SizeDelta: {x: 273.03, y: 0} + m_AnchoredPosition: {x: 155.935, y: 0} + m_SizeDelta: {x: 311.87, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1843006956921425075 MonoBehaviour: @@ -764,8 +764,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 136.515, y: 0} - m_SizeDelta: {x: 273.03, y: 0} + m_AnchoredPosition: {x: 155.935, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &8585709775089406178 MonoBehaviour: @@ -779,7 +779,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} m_Name: m_EditorClassIdentifier: - m_HorizontalFit: 0 + m_HorizontalFit: 2 m_VerticalFit: 2 --- !u!114 &3101455637694641571 MonoBehaviour: @@ -802,8 +802,8 @@ MonoBehaviour: m_Spacing: 10 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 1 - m_ChildControlHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 m_ChildScaleWidth: 1 m_ChildScaleHeight: 1 m_ReverseArrangement: 0 @@ -843,7 +843,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 136.515, y: 0} + m_AnchoredPosition: {x: 155.935, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &6806840113668947922 @@ -911,6 +911,16 @@ PrefabInstance: ' objectReference: {fileID: 0} + - target: {fileID: 3806516703089782040, guid: ea47665625ccfd4408f6411caf45f910, + type: 3} + propertyPath: m_fontSize + value: 24 + objectReference: {fileID: 0} + - target: {fileID: 3806516703089782040, guid: ea47665625ccfd4408f6411caf45f910, + type: 3} + propertyPath: m_fontSizeBase + value: 24 + objectReference: {fileID: 0} - target: {fileID: 3806516703089782041, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchorMax.y @@ -934,7 +944,7 @@ PrefabInstance: - target: {fileID: 3806516703089782041, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchoredPosition.x - value: 17.91 + value: 20.49 objectReference: {fileID: 0} - target: {fileID: 3806516703089782041, guid: ea47665625ccfd4408f6411caf45f910, type: 3} @@ -1074,7 +1084,7 @@ PrefabInstance: - target: {fileID: 3806516704876462308, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchoredPosition.x - value: 204.77249 + value: 233.9025 objectReference: {fileID: 0} - target: {fileID: 3806516704876462308, guid: ea47665625ccfd4408f6411caf45f910, type: 3} @@ -1246,6 +1256,16 @@ PrefabInstance: ' objectReference: {fileID: 0} + - target: {fileID: 3806516703089782040, guid: ea47665625ccfd4408f6411caf45f910, + type: 3} + propertyPath: m_fontSize + value: 24 + objectReference: {fileID: 0} + - target: {fileID: 3806516703089782040, guid: ea47665625ccfd4408f6411caf45f910, + type: 3} + propertyPath: m_fontSizeBase + value: 24 + objectReference: {fileID: 0} - target: {fileID: 3806516703089782041, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchorMax.y @@ -1269,7 +1289,7 @@ PrefabInstance: - target: {fileID: 3806516703089782041, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchoredPosition.x - value: 36.165 + value: 42.4 objectReference: {fileID: 0} - target: {fileID: 3806516703089782041, guid: ea47665625ccfd4408f6411caf45f910, type: 3} @@ -1394,7 +1414,7 @@ PrefabInstance: - target: {fileID: 3806516704876462308, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchoredPosition.x - value: 68.2575 + value: 77.9675 objectReference: {fileID: 0} - target: {fileID: 3806516704876462308, guid: ea47665625ccfd4408f6411caf45f910, type: 3} diff --git a/Assets/Scenes/House.unity b/Assets/Scenes/House.unity index 138da27a..6594f478 100644 --- a/Assets/Scenes/House.unity +++ b/Assets/Scenes/House.unity @@ -1413,6 +1413,11 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 5352761843658582779, guid: 8939548f67eb43c4fa321f112c45f83b, + type: 3} + propertyPath: m_MatchWidthOrHeight + value: 1 + objectReference: {fileID: 0} - target: {fileID: 5513895733386360264, guid: 8939548f67eb43c4fa321f112c45f83b, type: 3} propertyPath: m_AnchorMax.y @@ -1821,22 +1826,22 @@ PrefabInstance: - target: {fileID: 7442524031950193185, guid: 8939548f67eb43c4fa321f112c45f83b, type: 3} propertyPath: m_AnchorMax.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7442524031950193185, guid: 8939548f67eb43c4fa321f112c45f83b, type: 3} propertyPath: m_AnchorMin.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7442524031950193185, guid: 8939548f67eb43c4fa321f112c45f83b, type: 3} propertyPath: m_AnchoredPosition.x - value: 250 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7442524031950193185, guid: 8939548f67eb43c4fa321f112c45f83b, type: 3} propertyPath: m_AnchoredPosition.y - value: -90 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7447373990901456422, guid: 8939548f67eb43c4fa321f112c45f83b, type: 3} @@ -2160,6 +2165,21 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 9053928588787978435, guid: 8939548f67eb43c4fa321f112c45f83b, + type: 3} + propertyPath: m_SizeDelta.x + value: 1920 + objectReference: {fileID: 0} + - target: {fileID: 9053928588787978435, guid: 8939548f67eb43c4fa321f112c45f83b, + type: 3} + propertyPath: m_SizeDelta.y + value: 1030 + objectReference: {fileID: 0} + - target: {fileID: 9053928588787978435, guid: 8939548f67eb43c4fa321f112c45f83b, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} - target: {fileID: 9134552743679572021, guid: 8939548f67eb43c4fa321f112c45f83b, type: 3} propertyPath: m_AnchorMax.y