-
Notifications
You must be signed in to change notification settings - Fork 11
Runtime Scripting
The runtime API allows you to access, paint and erase tiles at runtime using brushes. This can be useful when developing custom tile-based character controllers, level designers, etc.
Here are some of the capabilities of the runtime API:
-
Paint and erase tiles using brushes.
-
Calculate tile index using ray tracing.
-
Find tile nearest given world position.
-
Access tile data by row and column indices.
-
Use tile data to assist with game logic (orientation, variation index, flags).
-
Postpone and control generation of procedural meshes.
For further information please take a look at the API reference.
-
Consequences of Stripping
Certain runtime functionality becomes unavailable when stripping is applied to a tile system. The level of capabilities lost depends upon the level of stripping that has been applied. -
Creating a Tile System Dynamically
Tile systems can be created and used at runtime. This section demonstrates how to implement this. -
Painting at Runtime
The runtime API makes it easy to paint and erase tiles at runtime by reusing the brushes that you have already defined. -
Accessing Tiles
Each non-empty tile is represented by a data object which describes its state and references the attached game object when applicable. Tiles can be accessed via the tile system component or on a per-chunk basis.
Source: topics/Runtime-Scripting.md
Copyright © Rotorz Limited. All rights reserved.