TilePlus Version 5
Unity3D Tilemap Extension
Loading...
Searching...
No Matches
TilePlus.MessagePacket< T > Class Template Referenceabstract

Abstract base class for message packets. More...

Inheritance diagram for TilePlus.MessagePacket< T >:

Public Member Functions

virtual void Reset ()
 Reset the SourceInstance. Override for additional resets of variables holding references.

Protected Member Functions

 MessagePacket (Object? sourceInstance)
 Source Instance for this packet. Can be null.

Properties

ObjectSourceInstance [get, set]
 The instance that's the source of the message. Can be null.
ulong Id [get, set]
 The ID of this packet. Packet recepients can test this to see if they're being sent the same message repeatedly. Note that 0 is not used except internally.

Detailed Description

Abstract base class for message packets.

Template Parameters
TType of this packet

The source instance can be null, usage dependent. In general it's a good idea to supply it when it's not from a static class invocation It's mandatory if you're using tile-to-tile messaging.

Member Function Documentation

◆ MessagePacket()

TilePlus.MessagePacket< T >.MessagePacket ( Object? sourceInstance)
protected

Source Instance for this packet. Can be null.

Parameters
sourceInstance

◆ Reset()

virtual void TilePlus.MessagePacket< T >.Reset ( )
virtual

Reset the SourceInstance. Override for additional resets of variables holding references.

Reimplemented in TilePlus.ActionToTilePacket, TilePlus.ObjectPacket, and TilePlus.PositionZmPacket.

Property Documentation

◆ Id

ulong TilePlus.MessagePacket< T >.Id
getset

The ID of this packet. Packet recepients can test this to see if they're being sent the same message repeatedly. Note that 0 is not used except internally.

◆ SourceInstance

Object? TilePlus.MessagePacket< T >.SourceInstance
getset

The instance that's the source of the message. Can be null.


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