CSS Flex layouts in Unity3D

Category UIToolkit

UIToolkit: pixel-perfect borders for adjacent DIVs/boxes

If you’re using Unity’s UIToolkit you’ll sooner-or-later run into this nasty bug: two boxes side-by-side but the border in-between is twice as thick as it should be. In the image below we wanted the boxes on the right (‘a-aaa’ and … continue reading

2021 UIToolkit – all Tutorials

For making in-game UI your best option is Unity’s own UnityUI paired with Flexbox4Unity, allowing you to use modern CSS3/Flexbox layouts within Unity’s UI system, with RectTransforms etc working seamlessly together (but without all the problems of ContentSizeFitter not … continue reading

2021 UIToolkit Tutorial – Buttons

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 – 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

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

© 2021 Flexbox 4 Unity — Powered by WordPress

Theme by Anders NorenUp ↑