Skip to content

Add UIPolishSetup editor tool for automated UI component setup#379

Open
Shombith03 wants to merge 7 commits into
developmentfrom
claude/polish-ui-gdc-launch-SoMFm
Open

Add UIPolishSetup editor tool for automated UI component setup#379
Shombith03 wants to merge 7 commits into
developmentfrom
claude/polish-ui-gdc-launch-SoMFm

Conversation

@Shombith03

Copy link
Copy Markdown
Contributor

Summary

Introduces a new editor utility tool that automates the setup of UI polish components across the project. This one-click solution streamlines the process of attaching animation and interaction components to UI elements.

Key Changes

  • New UIPolishSetup editor tool (Assets/Editor/UIPolishSetup.cs):
    • Provides a "Tools > Cosmic Shore > Setup UI Polish Components" menu with both an all-in-one option and individual setup methods
    • AddButtonJuiceToAllButtons(): Automatically attaches UIButtonJuice components to all Button instances
    • AddSelectionHighlightToAllSelectables(): Attaches SelectionHighlight components to all Selectable UI elements
    • AddAutoNavSetupToScreenRoots(): Adds AutoNavSetup to screen roots (via ScreenSwitcher) and modal windows
    • AddMenuDPadNavigator(): Adds MenuDPadNavigator to the EventSystem with auto-wiring of ScreenSwitcher reference
    • Includes safety checks to skip immutable prefabs and avoid duplicate component additions
    • Provides detailed logging of components added and uses Undo system for editor safety

Implementation Details

  • Uses Resources.FindObjectsOfTypeAll() to locate components across loaded scenes and prefabs
  • Respects immutable prefab protection via PrefabUtility.IsPartOfImmutablePrefab()
  • Leverages Undo.AddComponent() for full undo/redo support
  • Marks modified GameObjects as dirty for proper serialization
  • Includes auto-wiring logic for ScreenSwitcher reference in MenuDPadNavigator
  • Each setup method is independently callable via menu items for granular control

https://claude.ai/code/session_01KRzd9ZSR5r5zPZTiPMdQ48

claude added 7 commits March 5, 2026 18:30
- Add universal gamepad/DPad navigation system (MenuDPadNavigator,
  AutoNavSetup, SelectionHighlight) for full controller support
  across all menu screens
- Add UIButtonJuice component for scale-punch press feedback on
  any button (works with both touch and gamepad)
- Upgrade NavLink with DOTween scale bounce + Y-offset animation
  on tab activation, plus ISelectHandler for gamepad navigation
- Replace ScreenSwitcher coroutine lerp with DOTween OutCubic
  transitions, add controller auto-select on screen change
- Add NavGroup DPad L1/R1 shoulder button cycling between tabs
- Add HomeScreen entrance animation (stagger scale+fade on elements)
- Upgrade ModalWindowManager with optional DOTween entrance/exit
  (scale+fade) and controller auto-focus on modal open
- Upgrade SwitchToggle from instant jump to smooth DOLocalMove
  with color tween
- Reorganize _Graphics folder: consolidate UI sprites under UI/,
  elements under Elements/, characters under Characters/, remove
  {LEGACY} and {PLACEHOLDERS} folders, fix "Design Assests" typo
- Add 4 sprite atlases (NavBar, Buttons, HUD, Arcade)

https://claude.ai/code/session_01KRzd9ZSR5r5zPZTiPMdQ48
- UIPolishSetup.cs: One-click Editor menu (Tools > Cosmic Shore) to batch-attach
  UIButtonJuice, SelectionHighlight, AutoNavSetup, and MenuDPadNavigator
- Created .meta files for all 4 new FX scripts
- Created .meta files for all UI sprite subfolders (15 folders)
- Created .meta files for all 4 sprite atlases
- Fixed sprite atlas packables to reference correct folder GUIDs

https://claude.ai/code/session_01KRzd9ZSR5r5zPZTiPMdQ48
- Remove manual buttonSouth handler from ArcadeDPadNav that was
  bypassing EventSystem and launching wrong game modes on A press
- Invert DOTween flag in ModalWindowManager so all modals use smooth
  scale+fade entrance by default (previously required opt-in per modal)

https://claude.ai/code/session_01KRzd9ZSR5r5zPZTiPMdQ48
…game)

- PauseMenu: Start button toggles pause, B button closes pause menu,
  auto-focus first selectable for DPad navigation, multiplayer support
- Scoreboard: auto-focus Play Again button for gamepad users when shown
- EndGameCinematicView: auto-focus Continue button for gamepad when revealed

https://claude.ai/code/session_01KRzd9ZSR5r5zPZTiPMdQ48
- ModalWindowManager: disable Animator component when using DOTween path
  to prevent Animator from overriding scale/alpha and hiding the modal
- PreGameCinematicController: A button or Start button skips the
  pre-game cinematic flythrough
- MiniGameHUD: auto-focus Ready button for gamepad users when shown

https://claude.ai/code/session_01KRzd9ZSR5r5zPZTiPMdQ48
…ting panel

- ArcadeGameConfigureModal: hide next/prev vessel buttons when only one
  vessel is available for the selected game mode
- SO_GameModeTips: new ScriptableObject for per-game-mode tips with
  optional common tips merge (CreateAssetMenu: CosmicShore/UI/GameModeTips)
- SO_ArcadeGame: added Tips field reference
- ConnectingPanel: displays a random tip from the active SO_GameModeTips
  on the connecting panel TMP_Text (add text element in scene)
- MiniGameHUD: pushes tips from ArcadeGameConfigSO to ConnectingPanel
  before showing the panel
- MiniGameHUDView: exposed ConnectingPanel property

https://claude.ai/code/session_01KRzd9ZSR5r5zPZTiPMdQ48
Replaced per-game-mode SO references with a single SO_GameModeTips
asset that maps GameModes to tip strings with common tips merged in.
ConnectingPanel now holds the tipsList reference directly and receives
only the GameMode from MiniGameHUD. Removed Tips field from
SO_ArcadeGame and ArcadeGameConfigSO dependency from MiniGameHUD.

https://claude.ai/code/session_01KRzd9ZSR5r5zPZTiPMdQ48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants