public void OnBeforeSerialize() { if (this._serializedConditions == null) { this._serializedConditions = new List <string>(); } else { this._serializedConditions.Clear(); } if (this._conditions == null) { return; } foreach (ITransitionCondition condition in this._conditions) { string serializedCondition = JsonSerialization.SerializeGeneric(condition); if (serializedCondition != null) { this._serializedConditions.Add(serializedCondition); } } }
public void OnBeforeSerialize() { if (this._serializedNodeDelegates == null) { this._serializedNodeDelegates = new List <string>(); } else { this._serializedNodeDelegates.Clear(); } if (this._nodeDelegates == null) { return; } foreach (INodeDelegate nodeDelegate in this._nodeDelegates) { string serializedNodeDelegate = JsonSerialization.SerializeGeneric(nodeDelegate); if (serializedNodeDelegate != null) { this._serializedNodeDelegates.Add(serializedNodeDelegate); } } }