-
Notifications
You must be signed in to change notification settings - Fork 11
Stripping
Home | Tile Systems | Tile System Optimization
Tile systems contain a lot of data and functionality that is often not required at runtime (though is essential at design time). These unwanted aspects can be stripped upon building a tile system.
At runtime tile data is stored within tile system and chunk components so that both tiles and chunks can be accessed easily. This data can be discarded using the appropriate stripping options.
Whilst the majority of these stripping options are best appreciated for optimized tile
systems, some of them can be applied at runtime when tile systems receive their first
Awake
message (see Runtime Options).
A number of stripping presets have been provided to cater for the most common use cases.
Stripping capabilities are reduced when procedurally generated tiles are present (unless they are pre-generated by selecting Pre-generate Procedural option). This is because tilesets and tile data are required to generate procedural tiles.
Remove runtime functionality.
Remove runtime functionality but retain tile system component so that it is still possible to calculate the index of a tile from a position in world space, calculate tile index from ray casting, etc.
Remember - Tile data is unavailable!
Preserve ability to access tile data at runtime.
Preserve ability to paint tiles and access tile data at runtime.
Perform maximum level of stripping.
Do not perform any stripping.
Define custom, see [Stripping Options].
Note - Selecting or deselecting certain stripping options will automatically cause dependent options to be altered.
For example, it is not possible to select "Strip tile system component" whilst at the same time deselecting "Strip chunk map".
Overview of custom stripping options that can be specified.
Removes TileSystem
component from tile system game object.
Removes chunk map from tile system component and removes Chunk
components from chunk
game objects.
Removes tile data from tile system chunk components.
Clears brush references from tile data.
Removes most empty game objects.
Removes game objects that have become empty after being combined with other tiles. Game objects will not be removed if they still contain components (like a collider, for example).
Removes chunk game objects and moves tile game objects into tile system game object.
Removes chunk game objects that are empty or that have become empty during build process.
Special components are automatically added to plop instances and group objects allowing greater control over interaction with plops; for instance, allowing picking and erase.
Whilst these components may be useful in custom scripts, they are not required at runtime and can be stripped to save memory.
Source: topics/Stripping.md
Copyright © Rotorz Limited. All rights reserved.