In the previous article, I shared best practices on how to import and set up the art assets in the project. Now let’s start using those assets in the game, while saving as much time as possible.

Let’s begin by unpacking the game’s elements. When setting up the elements of a game, we often encounter the following scenario:

On one hand, we have Prefabs that come from the art team – be it a Prefab generated by the FBX Importer, or a Prefab that has been carefully set up with all the appropriate materials and animations, adding props to the Hierarchy, etc. To use this Prefab in-game, it makes sense to create a Prefab Variant from it and add all the gameplay-related components there. This way, the art team can modify and update the Prefab, and all the changes are reflected immediately in the game. While this approach works if the item only requires a couple of components with simple settings, it can add a lot of work if you need to set up something complex from scratch every time.

On the other hand, many of the items will have the same components with similar values, like all the Car Prefabs or Prefabs for similar enemies. It makes sense that they’re all Variants of the same base Prefab. That said, this approach is ideal if setting up the art of the Prefab is straightforward (i.e., setting the mesh and its materials).

Next, let’s look at how to simplify the setup of gameplay components, so we can quickly add them to our art Prefabs and use them directly in the game.

Source: Unity Technologies Blog

0 0 votes
Article Rating