Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Grid Layout Tool for Unity

This project provides a Dynamic Grid Layout Tool for Unity, designed to simplify the creation of flexible and customizable grid layouts within the Unity Editor. It integrates seamlessly with Unity’s built-in UI system, allowing grids to dynamically adapt to content size or user input. Whether you're a beginner or an experienced Unity developer, this tool offers a practical solution for organizing UI elements efficiently. The repository includes a test scene to demonstrate its functionality.

Features

Dynamic Resizing: Automatically adjusts the grid based on the amount and size of content.

Unity UI Integration: Works smoothly with Unity’s standard UI components like RectTransform and Canvas.

Customizable: Easily tweak grid properties to fit your project’s needs.

Test Scene Included: Comes with a sample scene to showcase how the tool works in action.

Presets: select predefined grid presets to customize grid layouts effortlessly.

Updates

This section tracks the progress of the Dynamic Grid Layout Tool, including recent changes and planned enhancements.

Recent Updates

  • 06 March 2025: Initial release of the tool with basic dynamic grid functionality and a test scene.
  • 12 March 2025: Inspector GUI improvments added.
  • 23 April 2025: Documentation improvements added

Planned Features

  • Integration with Unity’s Layout Group components for enhanced compatibility.
  • PDF Documentation.
  • Alignment options will be added.
  • Support for grid items of different sizes.
  • Custom functions for adding items via script.
  • Ability to adjust the settings of added items in the editor.
  • dynamic spacing
  • saving custom presets

Installation

Download or Clone: Get the repository by downloading the ZIP file or cloning it with git clone:

https://github.com/yunnsbz/Unity-Dynamic-Grid-Layout.git

Open in Unity: Launch Unity Hub, click "Open," and select the project folder.

Unity Version: Recommended to use Unity 2022.3 or later for compatibility.

Test It: Open the Scenes/SampleScene in the project to see the tool in action. Delete or duplicate grid items in the layout and see how it reacts to the changes

Usage

Add the DynamicGridLayout script to a UI GameObject (e.g., a panel or canvas).

Select a preset in the Inspector (e.g., custom, vertical list, horizontal list)

Configure the grid settings in the Inspector (e.g., cell size, spacing, padding row/column limits).

Populate the grid with content (e.g., buttons, images) manually or via script.

Watch the grid dynamically adjust as you add or remove elements.

Check the included SampleScene for a practical example of how to set up and use the tool.

Contributing

Contributions are welcome! If you find a bug or have a feature suggestion: Open an Issue to report it.

Fork the repository, make your changes, and submit a Pull Request.

License

This project is licensed under the MIT LICENSE. Feel free to use, modify, and distribute it as needed.

About

Dynamic Grid Layout Tool for Unity, designed to simplify creating flexible and customizable grid layouts. It integrates with Unity's UI system, dynamically adjusting to content size or user input.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages