Skip to content

cyberaslan/AdaptiveGrid

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

AdaptiveGrid

Overview

Adaptive UIBehaviour with auto-layout and flexible settings.

  1. No need to count or control cell size manually (in units) and ajust to parent size changes.
  2. Elements dont freeze like in LayoutGroup (it transforms not driven by object). Means it could be animated or used any other way.
  3. Rebuilds only in regular cases (OnTransformChildrenChanged, OnTransformChildrenChanged, OnCanvasHierarchyChanged, OnValidate).
  4. Easy to extend: just create class inherited from Preset and its enum-value for inspector (ArrangeLayout or ScaleMethod).

How to use

  1. Import package
  2. Add component AdaptiveGrid to any object
  3. Choose arrange mode:
  • Fill. Auto layout - all content fits screen.
  • Grid. Fixed layout - n*m cells fits screen. Set rows or columns number to 0 for screen overflow (scroll mode).
  • Pack. Atlas mode. Pack childs with Image component via MaxRects algorithm.

Component automatically arrange elements in container (fits content if it is Image)

Reacting to children order and composition changes

Flex padding settings

Fixed NxM grid and MaxRects bin pack by Image content

About

Adaptive UIBehaviour with auto-layout and flexible settings.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages