Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 3.28 KB

File metadata and controls

79 lines (56 loc) · 3.28 KB

Selectable Preview Overlay. Documentation

Quick Start Guide

  1. Install package from Github to project
  2. Open project
  3. create any UI.Selectabe (Button, Toggle, Slider, Scrollbar, or custom)
  4. Configure any Transition to it (Colors, Sprite Swap, Animator)
  5. Select this object in Hierarchy-window
  6. Open Scene-window
  7. find UI Selectable Overlay
  8. press any toggle in it
  9. Result: Selectable will force Transition to selected state

Example:

selectableOverlay2

Summary

  • single-file script
  • dockable overlay
  • hides if no Selectable in selection
  • not change any Serialized (saved) values, only temporal
  • preview all built-in animations: color, sprite swap, animation,
  • preview Custom animations based on UI.Selectable.DoStateTransition
  • Tested witn Unity 6, Unity 2022

Support Any Selectables

IMPORTANT

  1. Overlay hide if no Selectables in Selection

  1. Selectable (and it's prefab or scene) is marked dirty when switching (or forcing) states

Overlay Content (Toggles)

Overlay has different toggles, that force specific Selectable state

  • If no toggles enabled in overlay, Selectable component work as is
  • if any toggle is pressed then state of selected Selectables is forced

Next toggles work with any Selectable .only one toggle can be active at once

  1. Normal (interactive, not selected, no pointer upon, no pointer pressed )
  2. Highlighted (interactive, pointer upon, no pointer pressed )
  3. Pressed (interactive, pointer pressed )
  4. Selected ((interactive, selected)
  5. Disabled (not interactive)

Work with UI.Toggle only , can be active independently: 6. Inverted - If enabled, checkmark graphic hide with isOn = true and vice versa

Overlay Presentation

Overlay can display in next modes:

  1. Panel

image

  1. Horizontal toolbar

image

  1. Vertical

image

  1. Collapsed

image

Mode can be switched by docking Overlay to Scene window sidebars, or by overlay -> right mouse click -> mode