CSS Flex layouts in Unity3D

Author adam

2021 UIToolkit Tutorial – Clickable Labels

This tutorial is for anyone writing editor UI’s – e.g. Custom Inspectors, EditorWindows, etc – using Unity’s new UIElements/UIToolkit. Make sure you’ve read the previous articles on core concepts and how to access the root container/VisualElement.

(NB: UIToolkit doesn’t … continue reading

2021 UIToolkit Tutorial – Labels and Basic Styling

This tutorial is for anyone writing editor UI’s – e.g. Custom Inspectors, EditorWindows, etc – using Unity’s new UIElements/UIToolkit. Make sure you’ve read the previous articles on core concepts and how to access the root container/VisualElement.

(NB: UIToolkit doesn’t … continue reading

Docs: How does Flexbox autosize your UnityUI GUI components?

Documentation: customizing autosizing, understanding autosizing

Do you hate using Unity’s ContentSizeFitter component, that thing that so often fails to do the one task it was created for, and is incompatible with so many other parts of Unity’s Layout system? One … continue reading

2020 – UIToolkit for EditorWindows, Custom Inspectors, and Raw IMGUI

To recap … in Part 1, we learned:

  • You can create UIToolkit UI’s entirely in code, with no CSS files, no extra documents, everything in one place: easy to write, easy to maintain, simple and efficient
  • Everything in UIToolkit
continue reading

2020 – UIToolkit/UIElements Quickstart guide for Unity Editor scripting

Unity has three different UI frameworks that run in parallel (IMGUI, UnityUI, and UIElements/UIToolkit). The latest of these is UIToolkit (identical to UIElements, but the marketing team renamed it), and it’s really very good – but most of the docs … continue reading

Guide: Switch layout-algorithms

Difficulty: BEGINNER

With each release of Flexbox4Unity, you get multiple free layout algorithms. Usually you want to use the latest one, but if the latest one has fixed a bug you were relying on, or if it introduces new bugs, … continue reading

Guide: How to make Responsive Design Layouts in Unity 3D

Responsive Design is wonderful: you make your UI once, and have it automatically redesign itself to fit different screensizes and shapes, while looking great in all of them.

Game developers have been missing this feature – until now. It has … continue reading

Guide: Using Flexbox in Unity – 2020

What do I need?

Unity’s core UI system (UnityUI, also known as “uGUI”) has no support for Flexbox. However, you can download “Flexbox4Unity” from the AssetStore and it directly adds this missing support (there’s also a free version with reduced … continue reading

Troubleshooting: Type or namespace name ‘EventSystems’

Sometimes, when you add Flexbox4Unity to an existing project, Unity will generate this error in your console:

error CS0234: The type or namespace name

continue reading

Guide: Automatically resize UIScrollview

Difficulty: BASIC

Unity3D’s built-in scrollview by default won’t resize to fit the UI you place inside it – which isn’t very useful. A lot of people end up writing a script to make this work, but we’ll cover easier ways … continue reading

« Older posts Newer posts »

© 2024 Flexbox 4 Unity — Powered by WordPress

Theme by Anders NorenUp ↑