Latios-Framework

Latios-Framework

Unity ECS增强框架 提供多模块低级API和功能

Latios Framework是Unity ECS的扩展框架,提供多个功能模块和低级API。包括核心功能、QVVS变换、Psyshock物理、Myri音频、Kinemation动画渲染等系统。该框架旨在补充和增强Unity ECS,为开发者提供更多控制和灵活性。目前支持桌面平台,可扩展至其他平台。它不替代Unity ECS,而是提供额外工具来改进性能和功能。

Latios FrameworkUnity ECS游戏开发性能优化模块化设计Github开源项目

Latios Framework for Unity ECS – [0.10.6]

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.

This version targets Entities 1.2.1 with ENTITY_STORE_V1 and a minimum editor version of 2022.3.13f1.

[0.9.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

  • Mach-Axle AI – A utility AI evaluator designed for high throughput
  • 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
  • Unnamed Environment – Terrain, water, vegetation, weather, proc-gen, and many other things to build worlds
  • 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.

In addition, the Latios Framework strives to fix multiple fundamental performance and behavior issues within Unity’s ECS packages. The results of such efforts are best demonstrated in this video. For a complete breakdown of these changes with each configuration and bootstrap, check out this guide.

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.

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

Proud Users of Latios Framework

Forks and Extensions

Open Projects

Support

TL;DR – I try to take issues and feedback as seriously as if this were a commercial project (or for the cynical, to shame commercial projects). Do not hesitate to reach out to me!

Issues (Bugs or Performance)

This is a hobby project and not my full-time job, so I cut corners and don’t spend a lot of time testing things. Sometimes I write code while an idea is in my head and just leave it there. Bugs will sneak in.

However, bugs are infuriating!

If you see a confusing error, send me a description of what you were doing and a stack trace with line numbers and the version you are using. You can use the GitHub issues, GitHub discussions, Discord, the DOTS forums, Unity PMs, or emails. Usually, I will find a bug fix locally, and provide instructions on how to apply the fix yourself. Then I will roll out the bug fix in my next release.

For strange behavior that doesn’t trigger errors, a repro is the only way to guarantee the issue gets diagnosed, but a good description can go a long ways too.

For performance issues, if you can’t send me a repro, send me a profile capture. It doesn’t matter if the issue makes your game unplayable or if you just want one task to be a couple hundred microseconds faster. I’m interested!

Feature Requests

Please send feature requests, even if it is already listed on one of the near-term roadmaps. It helps me prioritize. Requests for small utility functions or other simple concerns can usually be squeezed in patch releases. I always reserve full discretion. Try to propose your use case, and focus less on a proposed solution.

Learning Resource Requests

If you see gaps in the documentation, or are struggling to understand features, let me know. If you would like more demos and samples, also let me know what you would like an example of. I won’t build your game idea for you, but simple things I can try and squeeze in.

Derivatives, Collaboration, and Contribution

I develop this framework separately from this repository scattered across various projects. I will provide the current snapshot from any of those projects upon request. I promise the code may be terrible. This may be useful to you if you desire to contribute in an area I am actively developing. See Contributing for more information.

If you are developing your own packages on top of this framework, commercial or open source, feel free to reach out to me for suggestions, guidance, or to establish your stake in the areas that concern you. It is important to me that such dependent technologies are successful. For open source projects, I may even send a pull request.

Feature Releases and Compatibility

I do not promise backwards compatibility between feature releases (0.X). I will have upgrade guides detailing all the breakages and what to change. But it will be a manual process.

Patch releases (0.9.X) will always preserve backwards compatibility back to the last feature release.

While I will provide tips and suggestions if you use older releases, I will not publish patch releases for older versions.

Free Parking for All of the Above

If you are experimenting with features, vouching for a new feature, wish to collaborate, or are trying to hunt down a troublesome issue, the best way to ensure success is to make a dev dungeon in Free Parking. This provides an easy-to-access collaborative space for fast iteration, and can also serve as a regression test for further development.

Special Thanks To These Awesome Contributors

If you would like to be added to this list, see Contributing for how to get started.

  • Sovogal – Primary author of Mimic’s Mecanim addon and made significant contributions to the Calligraphics module (including the name)
  • canmom – Android support, Kinemation baking fixes, and build fixes
  • Fribur – Calligraphics rich text overhaul and shader improvements
  • Dechichi01 – Various fixes and improvements for Core, Psyshock, and Kinemation
  • Anthiese – Mac OS support
  • Lewis – Improvements to EntityWith<> and EntityWithBuffer<>
  • Everyone else who reported bugs and made the Latios Framework more stable for everyone

A Word of Caution

If you choose to modify any of the contents here licensed under the Unity Companion License, my understanding is that any modifications, including new inventions inserted, will belong to Unity as per the terms described by the license.

This license is subject to change to one that allows pieces of the Latios Framework not developed by Unity to be used in other ecosystems. If this is something you desire, feel free to discuss in the Latios Framework Discord.

If anyone at Unity sees this, know that you have full permission to use anything in here without attribution unless the code falls under one of the third-party licenses (which will be documented via comments directly next to the

编辑推荐精选

蛙蛙写作

蛙蛙写作

AI小说写作助手,一站式润色、改写、扩写

蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。

AI辅助写作AI工具蛙蛙写作AI写作工具学术助手办公助手营销助手AI助手
Trae

Trae

字节跳动发布的AI编程神器IDE

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
问小白

问小白

全能AI智能助手,随时解答生活与工作的多样问题

问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。

热门AI助手AI对话AI工具聊天机器人
Transly

Transly

实时语音翻译/同声传译工具

Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
讯飞星火

讯飞星火

深度推理能力全新升级,全面对标OpenAI o1

科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。

热门AI开发模型训练AI工具讯飞星火大模型智能问答内容创作多语种支持智慧生活
Spark-TTS

Spark-TTS

一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型

Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。

咔片PPT

咔片PPT

AI助力,做PPT更简单!

咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。

讯飞绘文

讯飞绘文

选题、配图、成文,一站式创作,让内容运营更高效

讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。

热门AI辅助写作AI工具讯飞绘文内容运营AI创作个性化文章多平台分发AI助手
材料��星

材料星

专业的AI公文写作平台,公文写作神器

AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。

下拉加载更多