class MAGES::PropertyCollection

Overview

A class meant to be used for grouping properties that can be overriden by a user. NOTE: OverridableProperty<T> can only be used in classes that inherit from PropertyCollection. More…

class PropertyCollection: public ISerializationCallbackReceiver
{
public:
    // properties

    object this[string field];

    // methods

    PropertyCollection();
    void OnBeforeSerialize();
    void OnAfterDeserialize();
};

// direct descendants

class Data;
class Data;
class Data;
class Data;
class Data;
class Data;

Detailed Documentation

A class meant to be used for grouping properties that can be overriden by a user. NOTE: OverridableProperty<T> can only be used in classes that inherit from PropertyCollection.

Properties

object this[string field]

Gets the value of the property with the given name.

Parameters:

field

The field name.

Returns:

The resolved object.

Methods

PropertyCollection()

Initializes a new instance of the PropertyCollection class.

void OnBeforeSerialize()

Called by Unity before serialization. No-op; required by ISerializationCallbackReceiver.

void OnAfterDeserialize()

Called by Unity after deserialization. Re-runs the locator binding because Unity creates PropertyCollection instances without invoking the constructor.