Flexalon Pro: 3D & UI Layouts
flexalon.com | Documentation | Playground | Templates | Discord
You can now get Flexalon Pro as part of the Flexalon + Proxima + Bindables bundle.
Version 4.0 - UI Update: You can now use Flexalon to build UI under a Canvas, animate your layouts, and add click/drag interactions. Learn More.
Let’s reimagine how we build 3D experiences.
Flexalon components let you quickly arrange objects in adjustable 3D patterns at edit time and/or runtime. The power of layout doesn't need to be limited to 2D. Try it out in your browser by visiting the playground.
Design with Superpowers
Use Flexalon Animator Components to create immersive motion graphics that bring life to your games, interfaces, and cutscenes.
Effortless Integration
Flexalon won’t break your existing workflow, and doesn’t have any dependencies. Flexalon will only edit objects with Flexalon Layout Components attached.
You’re in Control
Choose if Flexalon should run at edit time, in game, or manually whenever you decide.
Flexalon Template Pack: A FREE addon to Flexalon Pro that helps you get started quickly, with 16 working examples that you can study from and copy into your scenes! Download it at flexalon.com/templates.
=== FEATURES ===
Flexalon Objects
- Sizing: Precisely control width, height, and depth of objects.
- Fill & Shrink: Automatically size objects and layouts to fit the available space.
- Min / Max: restrict the size for objects and layouts.
- Margins and padding: Add empty space around objects and inside layouts.
Layouts
- Flexible Layout: Stack children linearly along the x, y, or z axis, with optional wrapping, alignment, gaps, and shrinking. Think CSS Flexbox in 3D.
- 3D Grid Layout: Arrange objects in evenly spaced rows, columns, and layers with rectangular or hexagonal cells.
- Circle Spiral Layout (PRO): Arrange objects in a circle, spaced evenly or at fixed intervals, with additional options to create a spiral or concentric circles.
- Curve Layout (PRO): Arrange objects along a line or Bézier curve with any number of points. Repeat the curve infinitely with 4 extension options.
- Random Layout (PRO): Randomize position, rotation, and size. Sometimes, you just need to make a mess.
- Align Layout (PRO): Align all children to any face, edge, or corner of the parent.
- Shape Layout (PRO): Arrange children in a shape formation with a specified number of sides. Great for unit formations and crowds.
- Constraints (PRO): Attach one object or layout to another, even if they are in different hierarchies.
- Custom Layouts: Create your own layouts by extending a base component.
Animators
- Curve Animator: Animate objects between layout positions with an adjustable animation curve.
- Lerp Animator: Animate objects between layout positions using linear interpolation.
- Rigid Body Animator: Animate rigid bodies towards layout positions using forces.
- Custom Animators: Create your own animation strategy by implementing an interface.
Click and Drag
- Flexalon Interactable: Add click and drag interactions which let users add, remove, and swap objects in layouts.
- XR Interactions: Built-in support for Oculus Interaction SDK and XR Interaction Toolkit. Drag objects with hands or controllers between layouts.
Data Binding
- Cloner: Generate objects based on a data source
- Data Binding: Implement an interface to update objects with data items.
Adapters
- Flexalon automatically works with:
- Mesh Renderer
- Sprite Renderer
- TextMeshPro
- Rect Transform (Including Canvas)
- Collider & Collider2D
- Custom Adapters: Implement an interface to make Flexalon work with your own components.
Attributions:
The 3D models and materials in the marketing videos are NOT included in the Flexalon 3D Layouts package. They come from other wonderful creators on the asset store, including:
Release Notes
## Version 4.4
IMPORTANT: Unity 2019 and 2021 are no longer tested. As always, please back up your project before updating.
Features
- Added built-in support for the new Input System. It should work out of the box with mouse input. For more advanced usage, see FlexalonInputSystemProvider. All samples have also been updated to work in both new and legacy input systems.
- Breaking Change: Disabled components (MeshRenderer, Image, etc.) are no longer used to determine the size of objects. You can override this behavior with a custom Adapter (see docs).
- Added some helpful methods to FlexalonGridLayout: GetCellPositionWorldSpace and GetCellPositionLocalSpace.
- New FlexalonInteractable property: Set Parent While Dragging. Normally, the interactable is unparented while being dragged. Setting this will set the parent to the currently hovered drag target.
- Support raycasting with Canvas render mode Screen Space Camera.
- Added FlexalonDpiScaler, which scales a Canvas pixel size to match the operating system screen settings.
- Added spacing options to Flexible Layout: Space Evently and Space Around.
Fixes
- Flexalon no longer preserves aspect ratio for ILayoutElement components. This was never intended.
- Fixed Flexalon Constrant scaling the child of a Canvas.
- Fixed collider adapter not scaling correctly.
Version 4.3.0
Features
- Improved UGUI Integration: UGUI components like TextMeshPro and Image will automatically be recomputed when properties change in play mode.
- FlexalonAspectRatioAdapter: Set a specific aspect ratio for an object.
- FlexalonColliderAdapter: Resizes an attached collider to match the object's layout size.
- FlexalonObject.UseDefaultAdapter: New property that can be disabled to make Flexalon treat the object as an empty gameObject and not consider components like MeshRenderer, TextMeshPro, etc.
- FlexalonInteractable.MaxClickDistance: Immediately converts a click to a drag if the mouse moves more than the specified distance.
Fixes
- Support negative Scale values in Flexalon Object.
- Fix floating point error in Flexible Layout preventing wrapping.
- Workaround for a TextMeshPro bug causing hanges in the template scene.
- Display and serialize the "AnimateInWorldSpace" property in Curve Animator.
- Disable the Flexalon Interactable placeholder when dragged off of a drag target.
- Fix Flexible Layout fill not working correctly if there is no remaining space.
- Fix some divide by zero errors.
Hotfix 4.2.1: Fix a regression where sometimes child sizes don't update from this performance fix.
Version 4.2.0
Features
- New option Flexalon.SkipInactiveObjects will cause all inactive gameObjects in the scene to be skipped in layouts. This is the same as enabling FlexalonObject.SkipLayout on individual objects. This option is enabled by default.
- Adding max size to a FlexalonFlexibleLayout can now cause it to wrap.
Fixes
- Performance: Avoid third layout pass when possible when using Fill size type on children.
- Performance: Make Directions struct immutable.
- Performance: Improve how Flexalon checks for the existance of FlexalonObject.
- Performance: Reduce garbage collection allocations by replacing foreach loops with for loops.
- Interactable: Fix how overlaps are calculated for drag targets with a non-center RectTransform pivot.
- Fix SkipLayout not working correctly for children in a FlexalonGridLayout.
- Fix TextMeshPro adapters not loading in Unity 2022.3 and Unity 6.
- Fix Flexalon adapters not working when a new gameObject is added to a layout in a script before another component is added like a mesh, image, or text.
- Fix how FlexalonConstraint computes fill sizes when the target is scaled.
- Fix max fill size not working on root layouts with RectTransform parents.
- Fix Unity 6 deprecation warnings.
Version 4.1.2
- Ensure FlexalonObject parameters are read even if the gameObject is inactive.
- Support additive scenes by allowing multiple Flexalon singletons to be in the scene. Only one will be used.
- Use RequireComponent to add FlexalonObject to layouts instead of adding it in OnEnable. This fixes some issues with Undo/Redo.
- Fix a destroyed FlexalonResult being accessed on redo.
- Fix NaN that can happen when assigning zero fill size.
- Fix an exception when leaving prefab mode on some versions of Unity.
- Fix an occasional exception on deserializing a grid layout.
- Fix an error that occurs if a Flexalon Interactables with a UI component is instantiated without a Canvas parent.
- Support canvases inside canvases by treating them as RectTransforms.
- Fix Flexalon Animators on children of a layout freezing when that layout is dragged by a Flexalon Interactable.
Version 4.1.1
- Avoid Flexalon changing transforms during undo/redo events.
- Avoid updating layout of objects that are being dragged.
- Fix how Flexible Layout gap affects the shrinking of children.
- Correctly serialize FlexalonLerpAnimator._animateInWorldSpace.
- Tweak the FlexalonInteractable insertion algorithm to detect overlaps using the cursor position instead of the object's current animating box position.
- Fix sample ImageAdapter.
Version 4.1.0
- Use AI to generate UI with Flexalon Copilot! Sign up for early access at flexalon.com/ai
- Support for min and max sizes, and improved Flexible Layout!
Features
- Flexalon Object has new fields for min and max. Values can be a fixed number or a percent of the parent.
- All built-in adapters and layouts updated to support min and max.
- Flexible Layout will now shrink objects which have not hit their min size using a similar algorihtm to Flexbox.
- Flexalon Object has new "Skip Layout" field. If set, the gameObject will be skipped by the parent layout.
Changes
- FlexalonAdapter and FlexalonLayout interface methods now take min and max parameters.
- Flexalon Object no longer auto-computes the offset, rotation, and scale when the transform is edited. This allows more consistent behavior when working with instantiated prefabs.
Fixes
- Allow pivot and anchor to be set on root objects which are not controlled by a layout or constraint. This allows ScrollRect to position Flexalon layouts properly.
- Fix warnings when user does Undo after a Flexalon component is automatically added.
- Fix exception if TextMeshPro is missing a font asset.
- Fix exception is Image component is sprite asset.
Version 4.0.0
You can now use Flexalon to build UI under a Canvas, animate your layouts, and add click/drag interactions.
- Coming soon, Flexalon UI Copilot will let you use natural language conversation with an AI to build your UI automatically. Learn more at flexalon.com/ai.
- PLEASE NOTE: If updating from an older version, this update includes changes that may require you to update your code. As always, save a copy of your assets before updating. See Notable Changes below.
New UI Features
- Use all Flexalon layouts, constraints, and modifiers to position your content.
- Animate your UI with Lerp and Curve Animators.
- Create click and drag interactions with Flexalon Interactables.
- Bind data to your UI with Flexalon Cloner.
- New UI samples scenes under Flexalon/Samples/Scenes/UI
- See all the details at: flexalon.com/docs/ui
New Layout Features
- Flexible Layout: New "Gap Type" property lets you space objects evenly to fill the layout.
- Circle Layout: New "Plane" parameter
- Lerp Animator & Curve Animator: New "Animate in World Space" checkbox. When checked (default), animations are based on the global coordinates. When unchecked, animations are based on the object's parent coordinates, which is useful if you're animating both the parent and the child and want them to stay together.
Notable Changes
- For all of the following changes, your assets will be automatically patched, but you may need to update your code to accommodate new property names, values, or renaming.
- Adapter interface has changed. UpdateSize has been replaced with TryGetScale and TryGetRectSize to support animating rect size and to avoid setting scale and rect size when they are handled by external components.
- Interactable.Collider has been replaced with Interactable.Handle, which supports UI components.
- FlexalonCircleLayout.VerticalAlign has been renamed to FlexalonCircleLayout.PlaneAlign to support the new "Plane" parameter.
- FlexalonCircleLayout.UseWidth has been replaced with FlexalonCircleLayout.InitialRadiusOption to support the new "Plane" parameter.
- FlexalonCircleLayout "In" and "Out" rotations have been flipped. "Backwards" has been renamed to "Backward".
- World space canvas with fill size will no longer scale to fit into the layout. The rect transform size will now be adjusted to fit into the layout.
Fixes and Changes
- Fixed a bug in nesting Flexible layouts with size type Fill.
- Flexalon Oculus Input Provider, which enables input handling for VR applications, now supports objects with multiple interactables.
- Fixed floating point errors causing Flexible Layout to wrap when it shouldn't.
- Setting Flexalon Object size to fill and also assigning a scale now computes the fill size correctly.
- Added some helper properties to the Directions class.
- GameObjects with Flexalon Constraints can now be placed under a layout - they will be skipped in the layout step.
- Fixed an interactable bug where a drag could start if the mouse is held down and dragged over an object.
Version 3.2.2
- Updated folder organization to support separate layout packages.
- Improved grid layout sample scene.
Version 3.2.0 "The XR Update"
Added support for VR interactions with integration for XR Interaction Toolkit and Oculus Interaction SDK.
New Features:
- New 'Flexalon XR Input Provider' allows Flexalon Interactables to be used with interactables from XR Interaction Toolkit.
- New 'Flexalon Oculus Input Provider' allows Flexalon Interactables to be used with interactables from Oculus Interaction SDK.
- New 'Insert Radius' property for Flexalon Interactable allows you to specify how close a dragged object needs to be to a layout before it is inserted.