December 25, 2024

Unity 2020.1 | new prefabrication editing workflow

In unity 2020 1, entering the preform mode will not leave the scene by default.

This means that when a preform asset is opened through the example in the scene, the user can start editing directly, and the background will only be gray to indicate the loss of focus.

Prefab mode 2018 3, which provides a simple way to edit preform resources separately.

However, the preform pattern does not edit the preform resource in the context of the instance.

In January 2020, we launched an improved preform workflow called prefabmodeincontext.

You can edit the preform (not an instance) as before, and the background can be displayed at the same time.

When you open the edit preform in InContext mode, the environment will turn gray by default, and you can set it to be fully visible or completely hidden.

When context is enabled, the context control option in the prefab toolbar can set the environment to: normal – display the environment in normal color,; gray – display the environment in gray,; hidden – completely hide the environment, and only the preform content is visible.

When a preform is opened in the InContext mode, the preform instance will be hidden, and the content of the preform resource will replace the instance, Appears at the location of the instance.

Preview the attribute overload on the preform instance.

You can see that when editing the preform, the position and steering attributes of the root transform disable editing, because they need to inherit specific values before the prefabasset will appear in the correct position.

These two values are not the values of the preform itself, but the parameters temporarily required for visualization, so editing this attribute is meaningless.

If you really need to edit the position and steering of the root transformation, you can open the preform editing separately.

In addition to the root transformation attribute, the preform instance has other attributes to edit, which can make the performance completely different from the performance inherited from the preform resource.

The user can check show overrides in the in context preform mode to preview the value overwritten on the preform.

The override attributes represented on the preform instance cannot be edited.

They are not the actual attribute values of the preform resource, but only temporary visual attribute values.

To view and edit the attribute values of prefabricated parts, you can uncheck the show override option at any time.

Preform in UI design this function is more useful for level design and UI (GUI) production.

When using the UI preform, the size of the parent recttransform of the instance is the same as that in the scene in the InContext mode, and the size and appearance of the instance are the same as that in the scene, so that the designer can have a better reference when adjusting different elements in the UI preform.

Edit a child preform in the parent UI window.

I hope prefabmodeincontext can be your right-hand assistant in editing preforms.

If you have any questions or suggestions, please leave a message at the end of the text.

Relevant links mentioned in the text: [1] unity2020 one.