![]() |
TilePlus Version 5
Unity3D Tilemap Extension
|
Assets of this type are added as refs to TilePlus tiles. More...


Public Member Functions | |
| virtual bool | Exec (TilePlusBase sourceInstance, Type? targetType, string tagString, ObjectPacket.EventsPropagationMode eventPropagationMode=ObjectPacket.EventsPropagationMode.None, string optionalString="", int optionalInt=0, bool optionalBool=false, object? optionalObject=null) |
| Messages other tiles. Fetches the Zone Bounds from a tile. Messages tiles which implement IZoneActionTarget, and have an explicit implementation of an ObjectPacket message target. Note the different way that the 'zone' is used. For TpZoneSlideShow the zone is used to demark which tiles will be messaged. For others, such as TpZoneAnimator or TpAnimZoneLoader or TpAnimZoneSpawner, the zone is used to detect when a supplied grid coordinate is contained within the zone with the intent of some sort of state change. | |
Public Attributes | |
| ScriptableObject? | m_Subasset |
| A subasset: optional. | |
Static Public Attributes | |
| const string | Command_ZoneAction = "ZONE_ACTION" |
| Name used for info string in the ObjectPacket sent to targets. | |
Assets of this type are added as refs to TilePlus tiles.
This base-class implementation uses the ObjectPacket message with the info string set to "ZONE_ACTION". This only matters if you use ObjectPacket for something else.
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 ZoneAction 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.
|
virtual |
Messages other tiles. Fetches the Zone Bounds from a tile. Messages tiles which implement IZoneActionTarget, and have an explicit implementation of an ObjectPacket message target. Note the different way that the 'zone' is used. For TpZoneSlideShow the zone is used to demark which tiles will be messaged. For others, such as TpZoneAnimator or TpAnimZoneLoader or TpAnimZoneSpawner, the zone is used to detect when a supplied grid coordinate is contained within the zone with the intent of some sort of state change.
| sourceInstance | TilePlus tile that's calling this method |
| tagString | optional tags for targets |
| targetType | Type of tile to target. If null, all types. |
| optionalString | Optional string value for packet |
| optionalInt | Optional int value for packet |
| optionalBool | Optional bool value for packet. |
| eventPropagationMode | how receipients of the messages sent by this should or should not propagate the event. |
| optionalObject | optional object value for packet. |
This version messages tiles with an ObjectPacket message target, and targets MUST implement the IZoneActionReceiver interface. That allows individual tile instances to opt out of being sent messages.
Reimplemented in TilePlus.TpZoneActionRadio.
|
static |
Name used for info string in the ObjectPacket sent to targets.
| ScriptableObject? TilePlus.TpTileZoneAction.m_Subasset |
A subasset: optional.
if it exists, the object field in the SelectionInspector will have an additonal button to open this.