Give Page Feedback

World Designer Tool - World Designer Data

World Designer Data are Scriptable Assets that holds World Designer specific data, which is needed by the tool to operate. More importantly, it also stores the World Regions you create via the World Designer tool so that you have access to them each time you use the tool with a particular World.

There are two primary reasons for using the World Designer Data asset:

1) It allows editor only data to be saved in a format that is confined to the editor (i.e., not included in builds).

Each World does not store a direct reference to the Data asset (even though a reference field is shown in the World Inspector). Instead, you can bind a Data Asset to the World, which stores the string GUID associated with the Data Asset on the World (more info can be found in the sub-section below).

We could store this data on the World component or on the Streamable Grid asset, however if we did so, that data would inflate the size of the scene or Streamable Grid asset with data that is not needed at runtime.

2) By removing this data from the Streamable Grid and World assets, it makes it easier for multiple developers on the same project to work with the same World and/or Streamable Grid asset.

Each developer can have a local copy of a World Designer Data asset that they can use to perform a variety of actions without needing to check out the underlying scene containing the World component from source control, or the underlying Streamable Grid asset of whatever World Grouping they are working on. To use the World Designer Tool in this way, simply use the Data Asset but DO NOT bind it to the World.

Of course, there are many operations while using the World Designer Tool that DO modify the underlying World Component or Streamable Grid assets, even with the use of the World Designer Data asset. For a full breakdown of these operations, and more considerations that need to be accounted for when using Version Vontrol systems, please see the dedicated Version Control Section within this Chapter.

In addition to these uses, the World Designer Data asset also allows you to better organize World Regions.

For instance, imagine you add an expansion to your game that includes a new land. Rather than adding new World Regions for working with this new land to an existing World Designer Data asset, you can create a new asset that stores only World Regions for the expansion.

Or, if you have a game with a very large world, you might choose to keep World Regions for each zone of the World in a separate Data asset.

Binding Data Assets

By default, World Designer Data Assets are assigned to a reference field on the Inspector of the World, rather than to the World component. This stops the World from being modified any time the Data Asset assigned is changed, which is great if you are working in a team based workflow under a Version Control system.

When you navigate away from the World Inspector, perform a script recompilation or close the editor, the Data Asset reference is lost. Fortunately, the World Inspector editor code automatically searches the folder containing all Data Assets in order to try to identify the Data Asset that was last used with the World component. This ensures you do not need to reassign the Data Asset each time you want to launch the World Designer Tool.

In some situations, however, the editor code may have consistent trouble locating the correct Data Asset that you want to use. In these circumstances, you can bind the Data Asset to the World. Binding the Asset writes the Assets GUID to the World. This ensures that it will always be reassigned to the World Inspector each time the Inspector is opened (assuming it still exist).

If you are a solo Dev, binding the Asset has no known drawbacks, but if you are working in a team based environment under a Version Control system, binding the Data Asset will result in a modification to the underlying World Component, which will result in a modification to the Scene. If you commit those changes with the version control system, other devs will from then on check out a copy of the scene and World that contains the bound Data, which may be undesirable.

As such, when working under these conditions, we recommend not binding any World Designer Data assets to Worlds that will be worked on by multiple team members.

Creating The Data Asset

World Designer Data is created exclusively using the World Component's World Designer tab. Within this tab, you can create a completely new asset or duplicate whatever asset is assigned to the field.

Using either option, the new Data will be created in the Assets/Editor Default Resources/Deep Space Labs/SAM/WorldDesignerData folder, and it must be kept in this folder for the entire lifetime of the asset. The new data is assigned to the World in the inspector, but it is not automatically bound to the World (i.e., its GUID is not saved to the World). This ensures that the World is not modified, useful for working with Version Control systems.

Assigning The Data Asset

If you ever want to change the Data asset used by the World to one that you've already created, you can use the Object Picker tool, or drag and drop the asset from the folder mentioned above directly to the field.

Remember that even though a Reference Field for the Data Asset is shown in the World Inspector, the World does not actually hold a reference to the Asset. Instead, when you assign a Data Asset to the World Designer Data field, the string identifier of the Asset is set to a special field on the World. This is why you will notice the Scene needs to be saved anytime you change the World Designer Data asset used by the World!

Deleting Data Assets

You can delete World Designer Data assets at any time by navigating to the Assets/Editor Default Resources/Deep Space Labs/SAM/WorldDesignerData folder. Just remember that there is no way to undo the deletion, so please be sure you do not need to the use the Data Asset before removing it!

In order to help you make an informed decision on whether a Data Asset should be deleted, we include some useful information about the Data Asset and the last World that it was used with. This information includes:

1) The Year, Month, and Day the Asset was created, as well as how much time (in days) has passed since it was created.

2) The name of the Game Object associated with the World the Data was last used with.

3) The name of the Scene containing the World the Data was last used with.

4) The ID of the World the Data was last used with.

The date is usually a good indication of whether the Data Asset is still in use.

Use One Data Asset With Multiple Worlds

Typically, you will use a unique Data Asset with each World, however there are some situations where it can be beneficial to share a Data Asset across different Worlds. The most common use case is if you have multiple scenes that use the same World (with the same World Groupings and Streamable Grids).

When using the Data Asset across multiple Scenes/Worlds, just remember that most changes will carry over to those other Scenes/Worlds. This includes all of the settings that are editable in the World Designer Tool.

Renaming Data Assets

The name given to the World Desinger Data Assets is intended to help you identify which World and Scene the Asset was created for initially. With that said, you can rename the Assets at any time if you wish!