Game EnginesResourcesUnity 3D

Runtime authoring in projects using ECS for Unity

In a project using ECS for Unity, your Authoring Data has different types, structures, and properties than your Runtime Data. This means it’s impossible for the simulation to modify your Authoring Data – it doesn’t know or care about it. In fact, that representation of your data doesn’t even exist while the game is running. You should then be able to make modifications to your Authoring Data while the game is running – there’s no risk of corrupting your work anymore.

You also need the ability to decide which mode of your data is the most important to you at any given moment, depending on the context or task. Ideally, you would be able to go back and forth seamlessly.

With all of that in mind, we came up with the Data Modes pattern. It allows you to decide what representation of your data you interact with while making it extra clear what will happen to the modifications you make during Play mode.

There are three Data Modes: authoring, runtime, and mixed. Authoring and runtime are self-explanatory – you see either Authoring Data only or Runtime Data only. Mixed mode is more interesting, and truly shines when you are working on level design during Play mode. When you are in mixed mode, you see Authoring Data as much as possible. But wherever the runtime has taken over, you’ll see Runtime Data instead. In this mode, you can see a mix of authoring and runtime fields in the Inspector or a mix of GameObjects and Entities in the Entities Hierarchy. More on those two windows later.

The main components of the Data Modes pattern are: non-destructive Play mode authoring and live properties.

Source: Unity Technologies Blog

0 0 votes
Article Rating
Hi, I’m PhoneticLight

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x