Selection Inspector Toolbar
The Selection Inspector for TilePlus tiles has a toolbar:
Name | Usage |
---|---|
Focus | Focus scene view on selected tile. |
Inspector | Open an inspector for the tile. |
Save | Save the tile as a new asset. |
Inspect Prefab | If the tile has a GameObject then this button appears: open an inspector for the prefab. |
Refresh | Refresh the tile. |
Delete | Delete the tile. |
Copy GUID | Copy the GUID of a tile to the clipboard. |
Collapse | Collapse all the tile sections. |
Expand | Expand all the tile sections. |
Hide | Hide all details of the sections. |
The example Selection Inspector as seen in the previous section has an additional Toolbar button only seen with certain tiles: this is the Simulate ►
button.
Simulate is an editor-only function that, well, simulates what the tile will do at runtime.
For example, with TpAnimatedTile or TpFlexAnimatedTile the simulate function will cycle through the animation sequence so that you can preview it.
For TpSlideShow, simulate displays the slide show tiles.
It’s a convenient way to preview what your tile will do at runtime and is especially handy when you’re editing tiles in the scene and want to see if the changes make sense. It’s a simulation and won’t be exact.
About the Focus button
About the Inspect Prefab button
- Instantiate-Runtime-Only is ON: Prefab asset in the Project folder.
- Instantiate-Runtime-Only is OFF: GameObject instance of the Prefab in the Scene.
This can occasionally be confusing: if you did not have Instantiate-Runtime-Only ON when the Tile is painted then the Tile creates the scene GameObject immediately. If you later turn this flag OFF, the scene GameObject will not be removed! In this edge case the GameObject in the Scene is what will be inspected.
The instanced GameObject in the scene isn’t editable. Hence, the only way to remove the GameObject from the scene is to delete the Tile. This is a Unity effect, not a TilePlus effect.
Why Save a painted tile as a new asset?
You can save any painted TPT tile as a new asset file. This is an important feature, as you can create a TPT tile as a prototype, customize it in-editor and then save it as a new asset which can be dragged into a Palette.
Why copy the GUID?
For an example, see the Animation demo program (AnimatedTiles/Scenes/Animation-UnityUI) in the TilePlus Extras folder. There you’ll see UI buttons which can trigger Animation on/off in the animated tiles. The UI buttons send the GUID to a script that looks up the tile reference via TpLib.GetTilePlusBaseFromGuid.
The script then uses the MessagingService to send a message to the tile, affecting the animation.
GUIDs are used a lot in the TilePlus system as an alternative (i.e., not the primary) way to locate and/or communicate with TPT tiles. GUIDs have nothing to do with how the tiles actually work; rather, they’re present so that there’s a unique value to put in JSON (or other) save data files. You can locate a tile by its GUID without knowing what Tilemap it’s placed on.