TilePlus Version 5
Unity3D Tilemap Extension
Loading...
Searching...
No Matches
TilePlus.ITpPersistence< out TR, in T > Interface Template Reference

Interface for built-in data save/restore scheme. More...

Inheritance diagram for TilePlus.ITpPersistence< out TR, in T >:
Collaboration diagram for TilePlus.ITpPersistence< out TR, in T >:

Public Member Functions

TR GetSaveData (object options=null)
 Implement to provide data to save.
void RestoreSaveData (T dataToRestore)
 Implement to be sent data to restore.

Properties

bool AllowsRestore [get]
 Implementations may set this false if either data has already been restored OR if it doesn't want data restoration at all. New in 3.1.
bool AllowsSave [get]
 Implementations may set this false if nothing has changed in the tile. That avoids saving data from this tile if nothing has changed since instantiaton. Default is true; New in 3.1.

Detailed Description

Interface for built-in data save/restore scheme.

Template Parameters
TRThe type of the data returned by GetSaveData.
TThe type of the data sent to RestoreSaveData

Note that this is very similar to ISendMessage and uses the same abstract MessagePacket class as a data object.

Type Constraints
T :MessagePacket<T> 
TR :MessagePacket<TR> 

Member Function Documentation

◆ GetSaveData()

TR TilePlus.ITpPersistence< out TR, in T >.GetSaveData ( object options = null)

Implement to provide data to save.

Returns
TR.

◆ RestoreSaveData()

void TilePlus.ITpPersistence< out TR, in T >.RestoreSaveData ( T dataToRestore)

Implement to be sent data to restore.

Parameters
dataToRestoreThe data to restore.

Property Documentation

◆ AllowsRestore

bool TilePlus.ITpPersistence< out TR, in T >.AllowsRestore
get

Implementations may set this false if either data has already been restored OR if it doesn't want data restoration at all. New in 3.1.

Implemented in TilePlus.TpSlideShow.

◆ AllowsSave

bool TilePlus.ITpPersistence< out TR, in T >.AllowsSave
get

Implementations may set this false if nothing has changed in the tile. That avoids saving data from this tile if nothing has changed since instantiaton. Default is true; New in 3.1.


The documentation for this interface was generated from the following file:
  • /Users/jms/Documents/Tpt_55/TPT55/Assets/Plugins/TilePlus/Runtime/Interface/ITpPersistence.cs