TilePlus Version 5
Unity3D Tilemap Extension
Loading...
Searching...
No Matches
TilePlus.TpTileEventAction Class Reference

-—BASE CLASS ONLY-— Assets of this type are added as refs to TPT tiles. Takes an action when a TileEvent is evaluated by a controlling program. Such a program can, when handling events, see if there's a ref to one in a tile and execute its code. Moves code from center to edges. More...

Inheritance diagram for TilePlus.TpTileEventAction:
Collaboration diagram for TilePlus.TpTileEventAction:

Public Member Functions

virtual bool Exec (TilePlusBase tile, object? obj=null)
 Execute event handler.

Public Attributes

ScriptableObject? m_Subasset
 A subasset: optional.

Properties

virtual bool Incomplete [get]
 DEFAULT if not overriden is TRUE. If true, this EventAction doesn't do everything needed, and TpEvents.ProcessEvents will not remove the tile reference from the output list.

Detailed Description

-—BASE CLASS ONLY-— Assets of this type are added as refs to TPT tiles. Takes an action when a TileEvent is evaluated by a controlling program. Such a program can, when handling events, see if there's a ref to one in a tile and execute its code. Moves code from center to edges.

Note that the tile instance passed in is NOT saved. This is intentional to avoid memory leaks and other issues.

You don’t want to maintain state of any kind in an Event Action asset’s code unless you use that Action in only ONE tile asset. Similarly to other assets, changing serialized values in these assets in Editor-Play mode can cause all sorts of issues.

Member Function Documentation

◆ Exec()

virtual bool TilePlus.TpTileEventAction.Exec ( TilePlusBase tile,
object? obj = null )
virtual

Execute event handler.

Returns
T/F

Overrides should use base class to ensure tile isn't null

Member Data Documentation

◆ m_Subasset

ScriptableObject? TilePlus.TpTileEventAction.m_Subasset

A subasset: optional.

if it exists, the object field in the SelectionInspector will have an additonal button to open this in a popup inspector.

Property Documentation

◆ Incomplete

virtual bool TilePlus.TpTileEventAction.Incomplete
get

DEFAULT if not overriden is TRUE. If true, this EventAction doesn't do everything needed, and TpEvents.ProcessEvents will not remove the tile reference from the output list.


The documentation for this class was generated from the following file:
  • /Users/jms/Documents/Tpt_55/TPT55/Assets/Plugins/TilePlus/Runtime/AssetScripts/Actions/TpTileEventAction.cs