Zone-Based
AnimZoneLoader
This class is a subclass of TpFlexAnimated tile and inherits its fields and editor appearance.
It’s used to load archived Tilemaps from TpTileFab assets, which are created by the Tools/TilePlus/Prefabs/Bundle Tilemaps command.
IMPORTANT
It's somewhat obsoleted because of the Layout system and is NOT compatible with it.
Public fields:
- Loading Offset: the location where the TileFab will be placed.
- Preview: preview the TileFab at the Loading Offset.
- TileFab: A TileFab archive from a Project folder.
- UseZoneManager: Optionally use a Zone Manager for detection of already loaded TileFabs.
- ShowOffsetPositionGizmo: show a marquee at the
Zone Managers and their uses are discussed here.
More about Preview
Preview loads the tiles into a preview tilemap or maps, if there are multiple TpTileBundle assets referenced by the TpTileFab asset. The preview is active until you click Preview again or the Editor’s Selection changes. When preview is active, you can change the loading offset and the preview area will change position.
Loading or previewing tiles depends on there being compatible Tilemaps that are named or tagged in such a way that the system can identity which Tilemap to use. This information is embedded in the TileFab asset when you create it. If you need to change it just edit the asset’s TileAssets section in the Project window.
The tile does not automatically load Tilemaps at runtime. Rather, you send a message to it via the TpLib SendMessage methods. As configured, it expects the message to contain a Vector3Int describing a position. If the position is within the Zone bounds, the tile uses TpLib’s PostTileEvent method to post a trigger event.