lab  2016-03-28
lightweight ai behaviour trees framework for Unity 3D
lab.ASerializableParameter< TKey, TValue > Class Template Reference

Generic abstract class for dictionary serialization. More...

Inherits Dictionary< TKey, TValue >, and ISerializationCallbackReceiver.

Public Member Functions

 ASerializableParameter ()
 Default constructor. More...
 
 ASerializableParameter (ASerializableParameter< TKey, TValue > asp)
 Copy constructor. More...
 
void OnBeforeSerialize ()
 Method to receive a callback before Unity serializes your object. More...
 
void OnAfterDeserialize ()
 Method to receive a callback after Unity de-serializes your object. More...
 

Protected Attributes

List< TKey > _keys = new List<TKey>()
 
List< TValue > _values = new List<TValue>()
 

Detailed Description

Generic abstract class for dictionary serialization.

Unity cannot serialize dictionaries, so ASerializableParameter implements ISerializationCallbackReceiver. This gives possibility of custom serialization. However, this solition does not work with generic types, so we need to inherit from ASerializableParameter.

Template Parameters
TKeyKey type
TValueValue type

Constructor & Destructor Documentation

Default constructor.

Copy constructor.

Parameters
aspSerializable parameter to copy

Member Function Documentation

void lab.ASerializableParameter< TKey, TValue >.OnAfterDeserialize ( )

Method to receive a callback after Unity de-serializes your object.

void lab.ASerializableParameter< TKey, TValue >.OnBeforeSerialize ( )

Method to receive a callback before Unity serializes your object.


The documentation for this class was generated from the following file: