Added ValueSelectorRow option to int settings
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

- Добавил новый тип отображения настроек с целочисленным значением
- У этого типа можно настраивать шаг, выглядит приятнее
This commit is contained in:
Данил Ярош 2026-02-06 16:14:39 +03:00
parent 24aaf18d4b
commit 009152ac5b
19 changed files with 3089 additions and 314 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -297,7 +297,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_Spacing: 20
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1

View File

@ -0,0 +1,589 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1177523236204463029
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4955458061482846540}
- component: {fileID: 2684930320884664080}
- component: {fileID: 3007365135053393754}
m_Layer: 5
m_Name: Title
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4955458061482846540
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1177523236204463029}
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: 5574935806246283956}
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: 125, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2684930320884664080
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1177523236204463029}
m_CullTransparentMesh: 1
--- !u!114 &3007365135053393754
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1177523236204463029}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
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: "\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 5302535af1044152a457ed104f1f4b91, type: 2}
m_sharedMaterial: {fileID: 2164040, guid: 5302535af1044152a457ed104f1f4b91, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, 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: 40.4
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 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!1 &1619822033687377312
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 730652387237414644}
- component: {fileID: 6608188832027216408}
- component: {fileID: 3565666527730081389}
m_Layer: 5
m_Name: Value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &730652387237414644
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1619822033687377312}
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: 5627896420819186933}
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: 150, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6608188832027216408
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1619822033687377312}
m_CullTransparentMesh: 1
--- !u!114 &3565666527730081389
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1619822033687377312}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
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: 999999
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 5302535af1044152a457ed104f1f4b91, type: 2}
m_sharedMaterial: {fileID: 2164040, guid: 5302535af1044152a457ed104f1f4b91, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, 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: 42.65
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 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!1 &2538197309880924153
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5627896420819186933}
m_Layer: 0
m_Name: Selector
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5627896420819186933
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2538197309880924153}
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: 1103700965972976445}
- {fileID: 730652387237414644}
- {fileID: 6965511199955823544}
m_Father: {fileID: 5574935806246283956}
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: 400, y: 0}
m_SizeDelta: {x: 350, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4636128204290495225
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6965511199955823544}
- component: {fileID: 7372200330221479758}
- component: {fileID: 3817722121599101382}
m_Layer: 5
m_Name: Arrow_next
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6965511199955823544
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4636128204290495225}
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: 5627896420819186933}
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: 125, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7372200330221479758
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4636128204290495225}
m_CullTransparentMesh: 1
--- !u!114 &3817722121599101382
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4636128204290495225}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
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_Sprite: {fileID: 1197703181795215433, guid: 8991ce55ada140746b953a82d2b1f196, type: 3}
m_Type: 0
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!1 &5889801562878819187
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5574935806246283956}
- component: {fileID: 2418975827372844568}
- component: {fileID: 5605032421712587294}
- component: {fileID: -3390085835520027310}
m_Layer: 0
m_Name: Row_ValueSelector
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5574935806246283956
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5889801562878819187}
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: 4955458061482846540}
- {fileID: 5627896420819186933}
m_Father: {fileID: 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.5, y: 0}
m_SizeDelta: {x: -1, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2418975827372844568
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5889801562878819187}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: 70
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &5605032421712587294
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5889801562878819187}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4c856f3cf51e81642a471d0300e1cdea, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::RR.Common.UI.SettingUIItem
titleText: {fileID: 3007365135053393754}
descriptionText: {fileID: 0}
toggle: {fileID: 0}
slider: {fileID: 0}
dropdown: {fileID: 0}
input: {fileID: 0}
button: {fileID: 0}
prevButton: {fileID: 0}
nextButton: {fileID: 0}
optionValueText: {fileID: 0}
sliderValueText: {fileID: 0}
--- !u!114 &-3390085835520027310
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5889801562878819187}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f2e7c1d035f64917b5cef9d233afceec, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::RR.Common.Settings.UI.ValueSelectorRow
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: 0}
valueText: {fileID: 3565666527730081389}
--- !u!1 &6667746243977224163
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1103700965972976445}
- component: {fileID: 6286042809169003938}
- component: {fileID: 5597093297755522800}
m_Layer: 5
m_Name: Arrow_prev
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1103700965972976445
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6667746243977224163}
m_LocalRotation: {x: -0, y: -0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5627896420819186933}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -125, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6286042809169003938
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6667746243977224163}
m_CullTransparentMesh: 1
--- !u!114 &5597093297755522800
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6667746243977224163}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
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_Sprite: {fileID: 1197703181795215433, guid: 8991ce55ada140746b953a82d2b1f196, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,169 @@
fileFormatVersion: 2
guid: 8991ce55ada140746b953a82d2b1f196
TextureImporter:
internalIDToNameTable:
- first:
213: 1197703181795215433
second: Pointer_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: Pointer_0
rect:
serializedVersion: 2
x: 38
y: 36
width: 56
height: 62
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 9484249b2b81f9010800000000000000
internalID: 1197703181795215433
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
Pointer_0: 1197703181795215433
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7769,7 +7769,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_Spacing: 10
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
@ -9284,6 +9284,7 @@ MonoBehaviour:
sortByNameInsideGroup: 1
toggleRowPrefab: {fileID: -3497382869404314779, guid: 3f18baed1f4d89f4ab9b4caf0c789a38, type: 3}
sliderRowPrefab: {fileID: 5445087308684328405, guid: a85153c0090994b438ad050a1dbcc306, type: 3}
valueSelectorRowPrefab: {fileID: 5605032421712587294, guid: ef3fe155416356b4babfbdf354df7056, type: 3}
dropdownRowPrefab: {fileID: 1137542491512761884, guid: 1aa96bf602ff6b243b6f9844b30d87f1, type: 3}
inputRowPrefab: {fileID: 895630567611506380, guid: b9bddf8fad39ed546a60c1ca412c134d, type: 3}
buttonRowPrefab: {fileID: 6489304585556535039, guid: af71450598473d841b596834d93a58db, type: 3}
@ -9432,7 +9433,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.000034523957}
m_AnchoredPosition: {x: 0, y: -0.00000016372034}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1792218764
@ -10061,6 +10062,7 @@ GameObject:
- component: {fileID: 1932206570}
- component: {fileID: 1932206575}
- component: {fileID: 1932206573}
- component: {fileID: 1932206576}
m_Layer: 5
m_Name: SettingsModal
m_TagString: Untagged
@ -10163,6 +10165,36 @@ CanvasGroup:
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &1932206576
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932206568}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48cc9934c948ec44eacf006814bf813e, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::RR.Common.UI.SettingsButtonBinder
key: btn.statistics
button: {fileID: 0}
label: {fileID: 0}
onButtonClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1460883868}
m_TargetAssemblyTypeName: RR.Common.UI.AdminStatsWindowUIController, Assembly-CSharp
m_MethodName: Open
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &1959311158
GameObject:
m_ObjectHideFlags: 0

View File

@ -32,7 +32,6 @@ namespace RR.Common.Settings
if (SettingsManager.Instance)
{
SettingsManager.Instance.ResetAllToDefaults();
Debug.Log("[SettingsButtonActions] Настройки сброшены");
}
}
@ -41,7 +40,6 @@ namespace RR.Common.Settings
/// </summary>
public void QuitGame()
{
Debug.Log("[SettingsButtonActions] Выход из игры");
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
@ -64,7 +62,6 @@ namespace RR.Common.Settings
{
if (!string.IsNullOrEmpty(sceneName))
{
Debug.Log($"[SettingsButtonActions] Загрузка сцены: {sceneName}");
SceneManager.LoadScene(sceneName);
}
}
@ -76,7 +73,6 @@ namespace RR.Common.Settings
{
if (!string.IsNullOrEmpty(url))
{
Debug.Log($"[SettingsButtonActions] Открытие URL: {url}");
Application.OpenURL(url);
}
}
@ -87,7 +83,6 @@ namespace RR.Common.Settings
public void OpenSavesFolder()
{
string path = Application.persistentDataPath;
Debug.Log($"[SettingsButtonActions] Открытие папки: {path}");
Application.OpenURL($"file://{path}");
}
@ -97,7 +92,6 @@ namespace RR.Common.Settings
public void ReloadCurrentScene()
{
Scene currentScene = SceneManager.GetActiveScene();
Debug.Log($"[SettingsButtonActions] Перезагрузка сцены: {currentScene.name}");
SceneManager.LoadScene(currentScene.name);
}
@ -109,7 +103,6 @@ namespace RR.Common.Settings
if (SettingsManager.Instance)
{
SettingsManager.Instance.ApplyAll();
Debug.Log("[SettingsButtonActions] Настройки применены");
}
}
}

View File

@ -28,7 +28,6 @@ namespace RR.Common.Settings
if (!list.Contains(binder))
{
list.Add(binder);
Debug.Log($"[SettingsButtonDispatcher] Registered binder for key: {buttonKey} on {binder.gameObject.name}");
}
}
@ -64,7 +63,6 @@ namespace RR.Common.Settings
// Пробуем найти в зарегистрированных биндерах
if (bindings.TryGetValue(buttonKey, out var list) && list.Count > 0)
{
Debug.Log($"[SettingsButtonDispatcher] Dispatching key: {buttonKey}, registered binders: {list.Count}");
return InvokeBinders(list);
}
@ -84,11 +82,9 @@ namespace RR.Common.Settings
if (matchingBinders.Count > 0)
{
Debug.Log($"[SettingsButtonDispatcher] Found {matchingBinders.Count} binders in scene for key: {buttonKey}");
return InvokeBinders(matchingBinders);
}
Debug.Log($"[SettingsButtonDispatcher] No binders found for key: {buttonKey}");
return false;
}
@ -103,7 +99,6 @@ namespace RR.Common.Settings
{
if (binder != null)
{
Debug.Log($"[SettingsButtonDispatcher] Invoking binder on: {binder.gameObject.name}");
binder.Invoke();
anyInvoked = true;
}

View File

@ -38,17 +38,13 @@ namespace RR.Common.Settings
private void Awake()
{
Debug.Log($"[SettingsManager] Awake called. Instance = {(Instance != null ? Instance.name : "null")}");
if (Instance)
{
Debug.Log("[SettingsManager] Instance already exists, destroying this one.");
Destroy(gameObject);
return;
}
Instance = this;
Debug.Log($"[SettingsManager] Instance set to {name}");
DontDestroyOnLoad(gameObject);
path = Path.Combine(Application.persistentDataPath, "settings.json");
@ -57,10 +53,6 @@ namespace RR.Common.Settings
{
Debug.LogError("[SettingsManager] Database is not assigned! Settings will not work.");
}
else
{
Debug.Log($"[SettingsManager] Initialized with database containing {database.entries.Count} entries.");
}
LoadOrDefaults();
ApplyAll();
@ -98,10 +90,7 @@ namespace RR.Common.Settings
if (!database)
{
Debug.LogError("[SettingsManager] Database is not assigned and not found in Resources! Settings will not work.");
}
else
{
Debug.Log($"[SettingsManager] Initialized with database containing {database.entries.Count} entries.");
return;
}
path = Path.Combine(Application.persistentDataPath, "settings.json");
@ -147,8 +136,6 @@ namespace RR.Common.Settings
SettingValue clean = def.Sanitize(value);
map[key] = clean;
Debug.Log($"[SettingsManager] Set '{key}' = {value.type}: b={value.b}, i={value.i}, f={value.f}, s={value.s}");
// применяем СРАЗУ
SettingsApplier.Apply(def, clean);
@ -246,8 +233,6 @@ namespace RR.Common.Settings
SettingsApplier.Apply(def, clean);
OnSettingChanged?.Invoke(e.key, clean);
}
Debug.Log($"[SettingsManager] Reloaded settings from {path}");
}
}
catch (Exception ex)

View File

@ -132,8 +132,8 @@ MonoBehaviour:
defaultString:
minInt: 10
maxInt: 1000
intDisplayFormat: 0
intStep: 1
intDisplayFormat: 1
intStep: 5
minFloat: 0
maxFloat: 1
displayAsPercentage: 0

View File

@ -119,9 +119,18 @@ namespace RR.Common.UI
break;
case SettingValueType.Int:
// Int — делаем слайдер целочисленным (лучше чем инпут)
UseSliderInt(entry.minInt, entry.maxInt, v =>
SetSafe(entry.key, SettingValue.Int(v)));
// Для ValueSelector не создаём слайдер - его обрабатывает ValueSelectorRow
if (entry.intDisplayFormat == IntDisplayFormat.ValueSelector)
{
// ValueSelectorRow сам управляет значением
// SettingUIItem здесь только отображает label и description
}
else
{
// Int — делаем слайдер целочисленным (лучше чем инпут)
UseSliderInt(entry.minInt, entry.maxInt, v =>
SetSafe(entry.key, SettingValue.Int(v)));
}
break;
case SettingValueType.String:

View File

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using RR.Common.Settings;
using RR.Common.Settings.UI;
using TMPro;
using UnityEngine;
@ -35,6 +36,7 @@ namespace RR.Common.UI
private SettingUIItem toggleRowPrefab;
[SerializeField] private SettingUIItem sliderRowPrefab;
[SerializeField] private SettingUIItem valueSelectorRowPrefab;
[SerializeField] private SettingUIItem dropdownRowPrefab;
[SerializeField] private SettingUIItem inputRowPrefab;
[SerializeField] private SettingUIItem buttonRowPrefab;
@ -234,18 +236,34 @@ namespace RR.Common.UI
item.name = $"Setting_{entry.key}";
item.Bind(entry, showDescription);
// Если это Int ValueSelector, настраиваем компонент ValueSelectorRow
if (entry.valueType == SettingValueType.Int &&
entry.intDisplayFormat == IntDisplayFormat.ValueSelector)
{
ValueSelectorRow valueSelector = item.GetComponent<ValueSelectorRow>();
if (valueSelector != null)
{
int currentValue = SettingsManager.Instance.GetInt(entry.key);
valueSelector.Setup(entry, currentValue);
}
else
{
Debug.LogWarning($"[SettingsUIGenerator] ValueSelectorRow component not found on prefab for '{entry.key}'");
}
}
spawnedItems.Add(item);
}
private SettingUIItem PickPrefab(SettingEntry e)
{
return e.valueType switch
{
// По типу
SettingValueType.Bool => toggleRowPrefab,
SettingValueType.Float => sliderRowPrefab,
SettingValueType.Int => sliderRowPrefab ? sliderRowPrefab : dropdownRowPrefab,
SettingValueType.Int => e.intDisplayFormat == IntDisplayFormat.ValueSelector
? valueSelectorRowPrefab
: sliderRowPrefab ? sliderRowPrefab : dropdownRowPrefab,
SettingValueType.String => inputRowPrefab,
SettingValueType.Button => buttonRowPrefab,
SettingValueType.OptionPicker => optionPickerRowPrefab ? optionPickerRowPrefab : dropdownRowPrefab,
@ -257,13 +275,24 @@ namespace RR.Common.UI
public void RefreshValues()
{
for (int i = 0; i < spawnedItems.Count; i++)
{
if (spawnedItems[i])
{
spawnedItems[i].RefreshFromSettings();
// Если есть компонент ValueSelectorRow, обновляем и его
ValueSelectorRow valueSelector = spawnedItems[i].GetComponent<ValueSelectorRow>();
if (valueSelector != null && !string.IsNullOrEmpty(valueSelector.Key))
{
int value = SettingsManager.Instance.GetInt(valueSelector.Key);
valueSelector.SetValue(value);
}
}
}
}
private void OnGroupPanelExpandedChanged(SettingsGroupPanel panel, bool expanded)
{
Debug.Log($"[SettingsUIGenerator] Group '{panel.name}' expanded: {expanded}");
// Уведомляем подписчиков (например SettingsUI) об изменении состояния группы
OnGroupExpandedChanged?.Invoke();
}

View File

@ -0,0 +1,99 @@
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace RR.Common.Settings.UI
{
/// <summary>
/// Компонент-Selectable для элемента настроек с выбором значения стрелками влево/вправо.
/// Работает на одном префабе вместе с SettingUIItem.
/// </summary>
public class ValueSelectorRow : Selectable, IMoveHandler
{
[Header("References")]
[SerializeField] private TMP_Text valueText;
private SettingEntry _entry;
private int _currentValue;
private int _step = 1;
public void Setup(SettingEntry entry, int currentValue)
{
_entry = entry;
_currentValue = Mathf.Clamp(currentValue, entry.minInt, entry.maxInt);
_step = Mathf.Max(1, entry.intStep);
UpdateUI();
}
public new void OnMove(AxisEventData eventData)
{
if (_entry == null || !IsInteractable())
{
// Пробрасываем событие к базовому классу для стандартной навигации
base.OnMove(eventData);
return;
}
switch (eventData.moveDir)
{
case MoveDirection.Left:
DecreaseValue();
eventData.Use();
break;
case MoveDirection.Right:
IncreaseValue();
eventData.Use();
break;
case MoveDirection.Up:
case MoveDirection.Down:
// Пробрасываем вертикальную навигацию к базовому классу
base.OnMove(eventData);
break;
}
}
private void DecreaseValue()
{
int newValue = Mathf.Max(_entry.minInt, _currentValue - _step);
if (newValue != _currentValue)
{
_currentValue = newValue;
UpdateUI();
SettingsManager.Instance?.SetInt(_entry.key, _currentValue);
}
}
private void IncreaseValue()
{
int newValue = Mathf.Min(_entry.maxInt, _currentValue + _step);
if (newValue != _currentValue)
{
_currentValue = newValue;
UpdateUI();
SettingsManager.Instance?.SetInt(_entry.key, _currentValue);
}
}
private void UpdateUI()
{
if (valueText != null)
valueText.text = _currentValue.ToString();
}
public void SetValue(int value)
{
if (_entry == null)
return;
_currentValue = Mathf.Clamp(value, _entry.minInt, _entry.maxInt);
UpdateUI();
}
public string Key => _entry?.key;
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f2e7c1d035f64917b5cef9d233afceec
timeCreated: 1770378660

View File

@ -60,8 +60,8 @@ namespace RR.Common.UI
/// </summary>
public override void Open()
{
UpdateText();
base.Open();
UpdateText();
}
private void UpdateText()

View File

@ -157,10 +157,35 @@ namespace RR.Common.UI
{
StopCoroutine(_fadeCoroutine);
}
_fadeCoroutine = StartCoroutine(FadeCoroutine(0f, 1f, fadeDuration, () =>
// Проверяем, активен ли объект в иерархии после SetActive(true)
// Если родитель неактивен, запускаем корутину через ModalManager
if (gameObject.activeInHierarchy)
{
OnOpened?.Invoke();
}));
_fadeCoroutine = StartCoroutine(FadeCoroutine(0f, 1f, fadeDuration, () =>
{
OnOpened?.Invoke();
}));
}
else
{
// Объект неактивен в иерархии, запускаем через ModalManager
var modalManager = ModalManager.Instance;
if (modalManager != null && modalManager.gameObject.activeInHierarchy)
{
_fadeCoroutine = modalManager.StartCoroutine(FadeCoroutine(0f, 1f, fadeDuration, () =>
{
OnOpened?.Invoke();
}));
}
else
{
// Если ModalManager тоже недоступен, просто вызываем OnOpened без анимации
Debug.LogWarning($"[Modal] Cannot start fade coroutine for '{gameObject.name}' - object is inactive and ModalManager is not available");
canvasGroup.alpha = 1f;
OnOpened?.Invoke();
}
}
}
else
{
@ -183,12 +208,38 @@ namespace RR.Common.UI
{
StopCoroutine(_fadeCoroutine);
}
_fadeCoroutine = StartCoroutine(FadeCoroutine(canvasGroup.alpha, 0f, fadeDuration, () =>
// Проверяем активность объекта в иерархии
if (gameObject.activeInHierarchy)
{
gameObject.SetActive(false);
_isOpen = false;
OnClosed?.Invoke();
}));
_fadeCoroutine = StartCoroutine(FadeCoroutine(canvasGroup.alpha, 0f, fadeDuration, () =>
{
gameObject.SetActive(false);
_isOpen = false;
OnClosed?.Invoke();
}));
}
else
{
// Если объект неактивен, запускаем через ModalManager
var modalManager = ModalManager.Instance;
if (modalManager != null && modalManager.gameObject.activeInHierarchy)
{
_fadeCoroutine = modalManager.StartCoroutine(FadeCoroutine(canvasGroup.alpha, 0f, fadeDuration, () =>
{
gameObject.SetActive(false);
_isOpen = false;
OnClosed?.Invoke();
}));
}
else
{
// Если ModalManager недоступен, просто закрываем без анимации
gameObject.SetActive(false);
_isOpen = false;
OnClosed?.Invoke();
}
}
}
else
{

View File

@ -55,7 +55,7 @@ namespace RR.Common.UI
SubscribeToGenerator();
}
private bool _subscribedToGenerator = false;
private bool _subscribedToGenerator;
private void SubscribeToGenerator()
{
@ -69,7 +69,6 @@ namespace RR.Common.UI
if (settingsGenerator != null)
{
Debug.Log($"[SettingsUI] Subscribing to settingsGenerator events: {settingsGenerator.name}");
settingsGenerator.OnBuildComplete += OnGeneratorBuildComplete;
settingsGenerator.OnGroupExpandedChanged += OnGroupExpandedChanged;
_subscribedToGenerator = true;
@ -120,38 +119,30 @@ namespace RR.Common.UI
if (EventSystem.current != null)
{
EventSystem.current.SetSelectedGameObject(settingsGenerator.FirstSelectable.gameObject);
Debug.Log($"[SettingsUI] Selected first element from generator: {settingsGenerator.FirstSelectable.name}");
}
}
}
private void OnGroupExpandedChanged()
{
Debug.Log("[SettingsUI] OnGroupExpandedChanged called - rebuilding navigation");
// При сворачивании/разворачивании группы - перестраиваем навигацию
StartCoroutine(RebuildNavigationOnGroupChange());
}
private System.Collections.IEnumerator RebuildNavigationOnGroupChange()
{
Debug.Log("[SettingsUI] RebuildNavigationOnGroupChange started");
// Запоминаем текущий выбранный объект
GameObject currentSelected = EventSystem.current?.currentSelectedGameObject;
// Ждём кадр чтобы layout обновился
yield return null;
Debug.Log("[SettingsUI] Calling SetupExplicitNavigation after group change");
// Перестраиваем навигацию
SetupExplicitNavigation();
// Проверяем, активен ли текущий выбранный объект
if (currentSelected == null || !currentSelected.activeInHierarchy)
{
Debug.Log("[SettingsUI] Current selected is inactive, reselecting first element");
// Текущий элемент стал неактивен (свёрнут) - выбираем первый активный
var allSelectables = new System.Collections.Generic.List<Selectable>();
Transform searchRoot = settingsGenerator != null && settingsGenerator.ContentRoot != null
@ -165,7 +156,6 @@ namespace RR.Common.UI
if (allSelectables.Count > 0 && EventSystem.current != null)
{
EventSystem.current.SetSelectedGameObject(allSelectables[0].gameObject);
Debug.Log($"[SettingsUI] Reselected first element after group change: {allSelectables[0].name}");
}
}
}
@ -197,13 +187,9 @@ namespace RR.Common.UI
return;
}
Debug.Log($"[SettingsUI] Setting up navigation, searchRoot: {searchRoot.name}");
// Получаем все Selectable в порядке иерархии (только активные)
CollectActiveSelectables(searchRoot, allSelectables);
Debug.Log($"[SettingsUI] Found {allSelectables.Count} selectables");
if (allSelectables.Count == 0)
{
Debug.LogWarning("[SettingsUI] No active selectables found for navigation setup");
@ -242,11 +228,9 @@ namespace RR.Common.UI
nav.selectOnRight = null;
current.navigation = nav;
Debug.Log($"[SettingsUI] Set Explicit nav for: {current.name}, mode: {current.navigation.mode}");
}
// Настраиваем кнопку с<EFBFBD><EFBFBD>хранения
// Настраиваем кнопку сохранения
if (saveButton != null)
{
var saveNav = new Navigation();
@ -257,8 +241,6 @@ namespace RR.Common.UI
saveNav.selectOnRight = null;
saveButton.navigation = saveNav;
}
Debug.Log($"[SettingsUI] Explicit navigation setup complete. Elements: {allSelectables.Count}");
}
/// <summary>
@ -302,8 +284,8 @@ namespace RR.Common.UI
/// </summary>
public override void Open()
{
RefreshSettings();
base.Open();
RefreshSettings();
// Выбираем первый элемент для навигации
SelectFirstElement();
@ -348,7 +330,6 @@ namespace RR.Common.UI
if (target != null && EventSystem.current != null)
{
EventSystem.current.SetSelectedGameObject(target.gameObject);
Debug.Log($"[SettingsUI] Selected first element: {target.name}");
}
else
{