diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 193f3d3..4c82a97 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -2189,7 +2189,7 @@ RectTransform: 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: 0} + m_AnchoredPosition: {x: 0, y: -15} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 1} --- !u!1 &90196064 @@ -4051,7 +4051,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 168358557} - 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_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -4059,11 +4059,11 @@ RectTransform: - {fileID: 673671246} - {fileID: 325580663} - {fileID: 1793160175} - m_Father: {fileID: 240605636} + m_Father: {fileID: 1679508532} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -322.7, y: 141.4} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 215, y: 125} m_SizeDelta: {x: 393, y: 158} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &168358559 @@ -4485,7 +4485,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 186440823} - 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_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -4493,11 +4493,11 @@ RectTransform: - {fileID: 1630921641} - {fileID: 2004235292} - {fileID: 892977662} - m_Father: {fileID: 240605636} + m_Father: {fileID: 1679508532} 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: 19} + m_AnchoredPosition: {x: 0, y: 16} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &186440825 @@ -6120,15 +6120,12 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1679508532} - - {fileID: 1918801481} - - {fileID: 168358558} - - {fileID: 186440824} m_Father: {fileID: 1703079398} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: 0, y: 83} - m_SizeDelta: {x: 0, y: 194} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.000061035156} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &240605637 MonoBehaviour: @@ -25692,7 +25689,7 @@ RectTransform: 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: 78.100006, y: -19.9} + m_AnchoredPosition: {x: 78.099976, y: -19.9} m_SizeDelta: {x: 56, y: 56} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1120373102 @@ -38613,7 +38610,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -102, y: -63} + m_AnchoredPosition: {x: -102, y: -46} m_SizeDelta: {x: 200, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1656598369 @@ -39215,13 +39212,16 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 1918801481} + - {fileID: 168358558} + - {fileID: 186440824} m_Father: {fileID: 240605636} 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_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 83} + m_SizeDelta: {x: 0, y: 194} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1679508533 MonoBehaviour: @@ -45326,18 +45326,18 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1918801480} - 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_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1638461233} - {fileID: 1297640875} - m_Father: {fileID: 240605636} + m_Father: {fileID: 1679508532} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 321, y: 143} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: -220, y: 125} m_SizeDelta: {x: 393, y: 158} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1918801482 @@ -48358,6 +48358,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2062026438} + - component: {fileID: 2062026439} m_Layer: 5 m_Name: CenterUI m_TagString: Untagged @@ -48387,6 +48388,19 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2062026439 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2062026437} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4604a2dcf40e0f5449c31c6b6c1aca42, type: 3} + m_Name: + m_EditorClassIdentifier: + BannerPosIsBottom: 1 --- !u!1001 &2066022927 PrefabInstance: m_ObjectHideFlags: 0 @@ -50206,7 +50220,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: 102, y: -67} + m_AnchoredPosition: {x: 102, y: -50} m_SizeDelta: {x: 200, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2111986825 diff --git a/Assets/Scripts/Util/SetBannerPos.cs b/Assets/Scripts/Util/SetBannerPos.cs index 04e07cc..3db4594 100644 --- a/Assets/Scripts/Util/SetBannerPos.cs +++ b/Assets/Scripts/Util/SetBannerPos.cs @@ -10,14 +10,15 @@ public class SetBannerPos : MonoBehaviour list_SetBannerPos.Add(this); } + [Header("Need Full Rect")] public bool BannerPosIsBottom = true; private void Start() { var rt = GetComponent(); if (BannerPosIsBottom) - rt.anchoredPosition = new Vector2(rt.anchoredPosition.x, rt.anchoredPosition.y + 150f); + rt.offsetMin = new Vector2(rt.offsetMin.x, 150f); else - rt.anchoredPosition = new Vector2(rt.anchoredPosition.x, rt.anchoredPosition.y - 150f); + rt.offsetMax = new Vector2(rt.offsetMax.x, -150f); } } \ No newline at end of file