Class SerializableScenario
Overlayers a Scenario. Useful for serialization.
Inheritance
SerializableScenario
Assembly: Xareus.Scenarios.Unity.Edition.dll
Syntax
[Serializable]
public class SerializableScenario
Constructors
SerializableScenario()
Declaration
public SerializableScenario()
SerializableScenario(Scenario)
Declaration
public SerializableScenario(Scenario scenario)
Parameters
Properties
IsDeserializing
Declaration
public static bool IsDeserializing { get; }
Property Value
Scenario
Declaration
public Scenario Scenario { get; }
Property Value
Methods
DeserializeExternalScenarios(Scenario)
Handles external scenarios deserialization if they were loaded
Declaration
protected void DeserializeExternalScenarios(Scenario scenario)
Parameters
GetScenarioFromXml(string, string)
Get the scenario from the given XML text
Declaration
protected static Scenario GetScenarioFromXml(string xmlString, string scenarioInstanceId = null)
Parameters
Type |
Name |
Description |
string |
xmlString |
|
string |
scenarioInstanceId |
|
Returns
GetScenarioStateFromXml(string)
Get the scenario state from the given XML text
Declaration
protected ScenarioState GetScenarioStateFromXml(string xmlString)
Parameters
Type |
Name |
Description |
string |
xmlString |
|
Returns
GetScenarioStateXml()
Get the scenario state in XML format
Declaration
protected string GetScenarioStateXml()
Returns
GetScenarioXml()
Declaration
protected string GetScenarioXml()
Returns
OnAfterDeserialize()
Implement this method to receive a callback after Unity deserializes your object.
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Implement this method to receive a callback before Unity serializes your object.
Declaration
public void OnBeforeSerialize()
SaveScenarioState()
Declaration
public void SaveScenarioState()
SerializeExternalScenarios()
Handles external scenarios serialization if they are loaded
Declaration
protected void SerializeExternalScenarios()