Giter Site home page Giter Site logo

rboelen / unity-flex-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gilzoide/unity-flex-ui

0.0 0.0 0.0 10.95 MB

Flexbox layout support for Unity UI using the Yoga layout engine

License: The Unlicense

C++ 19.93% C# 74.36% Makefile 5.71%

unity-flex-ui's Introduction

Flex UI

openupm

Flexbox support for Unity UI using the Yoga layout engine.

Flex Layout demo

Features

  • Supported platforms: Windows, Linux, macOS, iOS, tvOS, visionOS, Android and WebGL
  • There is a single component you need: FlexLayout
  • Live updates in edit mode.
  • FlexLayout only lays out children that also have a FlexLayout component, so you can still use anchors and other Layout Elements where necessary.
  • Set additional layout engine configurations per object using FlexLayoutConfig assets.

How to install

This package is available on the openupm registry and can be installed using the openupm-cli:

openupm add com.gilzoide.flex-ui

Otherwise, you can install directly using the Unity Package Manager with the following URL:

https://github.com/gilzoide/unity-flex-ui.git#1.1.1

How to use

  1. Add a FlexLayout component to the UI object that will layout its descendants (children, grandchildren, etc...)
  2. Add FlexLayout components to the descendants that will be layed out by the root FlexLayouts.
  3. Configure the layout properties as necessary and see all changes live in edit mode.
  4. Enjoy ๐Ÿพ

All properties can be set in the Inspector as well as by code and the layout will be automatically refreshed. You can set several values in code and the layout will be calculated only once per frame.

To learn more about the properties supported by FlexLayout, check out the Yoga documentation in the "Properties" section: https://yogalayout.dev/docs

You can also set the layout engine configurations by creating FlexLayoutConfig assets and setting them to FlexLayout's "Configuration" property. These configurations include toggling of experimental features and controlling how Yoga rounds floating point values using the "Point Scale Factor" property.

unity-flex-ui's People

Contributors

gilzoide avatar rboelen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.