Skip to main content

Preparing for Builds

When using ZoneManager and ZoneLayout, you need to ensure that the referenced TileFabs are correctly included in a build. This is because the system must use TileFab GUIDs to locate each TileFab when using RestoreFromZoneRegJson.

When calling EnableZoneManagers one of the optional parameters is a map from TileFab GUID to TileFab asset instances. If you’re using ZoneLayout the TileFabs can be easily located at runtime by examining the layout instances. This can be seen in the Chunking demo program.

If that map isn’t provided, then the Resources folder is examined, and a mapping is created automatically. This occurs only once.

If you have references to the TileFabs somehow otherwise included in a build and not in Resource folders, then you can create this mapping yourself.

If you don’t provide the mapping and you don’t have the TileFabs in a Resources folder, then they won’t be located and the loading of such TileFabs will fail: this can confusingly work just fine in the Editor and fail in a build.