Latios Framework for Unity ECS – [0.11.X]
The Latios Framework is a powerful suite of high-performance low-level APIs and feature-sets for Unity’s ECS which aims to give you back control over your gameplay. If you like the general paradigms, syntax, and workflows of Unity’s ECS, but find Unity’s offerings to be incomplete or frustratingly full of quirky unintuitive details, then this framework may be exactly what you need to achieve your vision.
The Latios Framework does not replace Unity’s ECS, but rather complements it with additional APIs and tools. In some cases, the Latios Framework may override Unity ECS’s underlying mechanisms to provide more features or improve performance. Desktop platforms are supported out-of-the-box. Other platforms may require additional effort (i.e. compiling native plugins) to achieve functionality and performance benefits.
Originally, this framework was for my own personal hobbyist game development, and in a sense, still is. However, after several years of development, it has proven a valuable resource to the Unity ECS community. It is provided here free to use for personal or commercial usage and modification. All modules are licensed under the Unity Companion License. The modules may contain code borrowed from official Unity packages and therefore may be seen as derivative works. Despite this, the Latios Framework contains many adaptations of top-class solutions in the industry (see Third Party Notices) as well as original inventions geared towards Unity’s ECS.
The Latios Framework is best-known in the community for Kinemation, a module which provides extremely high-performance CPU animation and GPU skinned mesh rendering features.
This version targets Entities 1.3.2 with ENTITY_STORE_V1 and a minimum editor version of 2022.3.36f1.
[0.10.x] users, please read the Upgrade Guide!
If you have any experience with DOTS, please take this survey!
Modules
The Latios Framework contains multiple modules, each of which contain public API for your own use. Additionally, each module may contain addons. Addons are community contributed features, and consequently may have different design philosophies or support guarantees as other features. With that said, some addon authors are very active and offer support and reliability that surpasses native features.
Modules and addons are disabled by default and are installed via a custom bootstrap. Bootstrap templates are provided in the Assets Create menu.
Core
Core is an essentials kit for handling common programming concerns in Unity’s ECS. It contains many features you might have heard of such as Rng, Blackboard Entities, Collection Components, Instantiate Command Buffers, Smart Blobbers, Explicit System Ordering, and Baking Bootstraps. But there are many more features around. If there is a common “hard” problem in ECS, there’s a good chance Core has a tool to address it.
Common Reasons to Use:
- You use one of the other modules
- You want one of the features
Common Reasons to Avoid:
- You move a large amount of entities between worlds in the middle of gameplay
QVVS Transforms
QVVS Transforms provide custom transforms systems based on the concept of QVVS transforms, which are vector-based transforms that can represent non-uniform scale without ever creating shear. This module comes with a fully functional custom transform system with automatic baking and systems, offering more features, performance, and determinism than what is shipped with Unity.
If you wish to use Unity Transforms instead, you can enable a compatibility mode for all other modules using the scripting define LATIOS_TRANSFORMS_UNITY. Some features in the other modules will be disabled when you do this.
Common Reasons to Use QVVS Transforms:
- You want a good transform hierarchy solution
Common Reasons to Use Unity Transforms:
- You use Unity Physics, Unity Character Controller, or Unity NetCode.
Psyshock
Psyshock Physics is a physics and spatial query module focused on user control. While most physics engines provide out-of-the-box simulation, Psyshock instead provides direct access to the underlying algorithms so that you can craft the perfect physics simulation for your game and not waste any computation on things you don’t need. Psyshock’s Collision Layers can be built directly from Entity Queries, removing all the archetype guesswork out of collisions and triggers.
Common Reasons to Use Psyshock:
- You use QVVS Transforms
- You only need collision detection
- You want more control over physics
- Unity Physics events system is too expensive
Common Reasons to Use Unity Physics:
- You want an out-of-the-box full simulator with zero code
Myri
Myri Audio is an out-of-the-box pure ECS audio solution. It features 3D spatialization of both looping and non-looping audio sources, multiple listeners, directional and non-directional sources, and a voice combining feature to support massive amounts of sources at once. Playing audio is as simple as instantiating prefabs.
Common Reasons to Use:
- You want something simple and easy
Common Reasons to Ignore:
- You can afford FMOD
Kinemation
Kinemation Animation and Rendering provides authored animation, simulated animation, and everything in between. It includes an overhauled Entities Graphics for significantly improved performance of both skinned and non-skinned entities including true frustum culling and LOD crossfade support. It also provides a comprehensive API for injecting custom effects into ECS rendering.
On the animation side, Kinemation supports bone entity and optimized bone buffer configurations. It includes utilities for inertial blending. And for animation clips it leverages ACL, a powerful high quality animation compression solution used in AAA titles such as Rise of the Tomb Raider, Fortnite, and Valorant.
Common Reasons to Use:
- You use QVVS Transforms
- You want better rendering performance and features related to LODs, light probes, and deforming meshes
- You want to customize and extend ECS rendering with access to the culling logic
- You prefer code-driven animation workflows and inertial blending
- You wish to build your own animation visual tool tailored to your project
Common Reasons to Avoid:
- You absolutely require a robust out-of-the-box code-free skeletal animation solution for only a small number of entities
Calligraphics
Calligraphics is a world-space text rendering module. It uses TextCore fonts and formats text to be rendered via the Kinemation rendering pipeline, complete with custom ECS material property support. The text can be animated with the built-in tweening engine, or you can make your own animations with the glyph mapping API. Rich text tags are supported, with much of the implementation being ported from TextMeshPro and made Burst-compatible. Use Calligraphics for world-space labels, dialog, player names, and damage numbers.
Common Reasons to Use:
- You use QVVS Transforms
- You want animated text
- You are using any other module
Common Reasons to Avoid:
- TextMeshDOTS works and fully covers your needs
Mimic
Mimic provides behavioral replicas of popular solutions within the Unity ecosystem, rewritten to leverage the features of the other modules and the performance benefits of Unity’s ECS. With Mimic, teams can continue to use familiar and proven authoring tools and workflows while simultaneously being fully invested into Unity ECS and the Latios Framework.
- Addons
- Mecanim by Sovogal – Replication of Unity’s Animator Controller state machine with support for blend trees, interrupts, root motion, and events.
Future Modules
- Unika – A high-performance scripting solution including support for interfaces and coroutines using source generators
- Life FX – VFX simulations which add immersion to stylized worlds
- Mach-Axle AI – A utility AI evaluator designed for high throughput
- Unnamed Networking – Something fast and flexible at scale
Why Use the Latios Framework?
Typically, “frameworks” fall into one of two categories. Either, they are someone’s collection of convenience classes and extension methods, or they define a specific architecture and workflow for describing gameplay code.
While the Latios Framework has some of those things, its primary concerns are at the engine level. Many of its tools and solutions are inspired by GDC presentations, technical blogs, and research papers. A key focus of the framework is to make these advanced technologies usable within a DOTS-based production environment. But another common theme is fixing or providing alternatives for fundamental design issues in the official ECS packages. For technical reasons, it is a “framework”, but the individual APIs act more like a toolkit and stay out of the way. A developer using it should always feel in control. If not, there’s likely an issue worth bringing to attention.
0.5 marked the end of Phase II, where focus was placed on enabling technologies in Unity ECS such as audio and animation. Current Phase III development focuses on modernizing the technology for Entities 1.X and facilitating gameplay design.
Long term, the Latios Framework’s mission is to dramatically reduce the development effort required to make highly artistic 3D games and short films.
Still not convinced? Here’s a video showcasing the performance impacts:
And if you are concerned about all the ways this affects existing ECS workflows, there’s a comprehensive guide detailing the changes here: https://github.com/Dreaming381/Latios-Framework-Documentation/blob/main/What Parts of ECS Does the Latios Framework Change.md
Getting Started
There are three methods to install the framework package (contains all publicly released modules).
- Clone or submodule this repository into your project’s Packages folder (recommended for contributors or those wanting faster bugfixes and updates)
- Add package via Package Manager → Add package from git URL
- Add via OpenUPM
After installing the framework package, follow the instructions in the first section here. You may also want to look through the compatibility guide.
Getting Started pages and documentation are provided with each module.
Learning Resources
- Social
- Documentation (Click on any .md file)
- Forks and Extensions
- TextMeshDots – A standalone fork of Calligraphics
- Open Projects
Support
New feature releases occur every 4-9 months. Bugfix releases typically occur weekly.
Feel free to reach out here or on Discord for any of the following:
- You are attempting to use the framework and encounter issues
- You are considering using the framework and have questions about its features or whether it would be a good fit for your needs
- You have a feature request (no promises, as I am only one person)
- You would like to get involved and make things even better
- You have any feedback (negative or positive)
Enjoy the Latios Framework!