Skip to main content

TpLib Organization

Overview

The TilePlus Toolkit base runtime system, generically called "TpLib," is divided into two groups of code.

Static classes

  • These are static because they are required for editing support, or have low impact on domain reloading, or are required immediately in a built-app or when switching to Play mode in the Editor.
  • TpLib: The enabling and underlying library. Implements a Tilemap DataBase (TMDB).
  • TpZoneManagerLib: Editing support and Tile+Painter.
  • TpServiceManager: small and required immediately in Play mode.
  • TileFabLib: API for loading Tilefabs and managing ZoneManagers (Layout system). Needed for both Edit and Play/Build use.
  • TpTileUtils: small utility library, improper as service.
  • TpEvents: small, required immediately im Play mode.

Generally, these have to be present after a domain reload and are required for edit support for the Tile+Brush, TilePlusPainter, etc. Where possible, their domain reload time is minimized by:

  • Lazy initialization of arrays and lists
  • Simple 'InitializeOnLoad' methods.
  • Small memory allocations (overrideable with a project-level scriptable object).

Scriptable Runtime Objects

In this documentation these are often referred to as SRS.

These are runtime-only. They aren't needed for edit support and would impact domain reload time for various reasons, or perhaps you don't actually want to use all of these extra features.

  • TpTileTweener: a tweener for tile sprites
  • TpSpawner: pooled spawner
  • TpMessaging: Monobehaviour-to-tile or tile-to-tile messaging.
  • TpTilePositionDb: keeps track of occupied positions on specified Tilemaps.

Please see the ServiceManager section of this doc for more info.