Interface ICreateFromDataPair
Interface for a relation that can be created from 2 pieces of data and added to a set with 2 children
Namespace: Unity.MARS.Authoring
Syntax
public interface ICreateFromDataPair
Methods
ConformToData(TraitDataSnapshot, TraitDataSnapshot)
Modifies the properties so that the data is acceptable for this relation
Declaration
void ConformToData(TraitDataSnapshot child1Data, TraitDataSnapshot child2Data)
Parameters
Type | Name | Description |
---|---|---|
TraitDataSnapshot | child1Data | The data for child 1 that should pass this relation after this method is called |
TraitDataSnapshot | child2Data | The data for child 2 that should pass this relation after this method is called |
FormatDataString(TraitDataSnapshot, TraitDataSnapshot)
Formats data into a string that is human-readable and appropriate for the relation
Declaration
string FormatDataString(TraitDataSnapshot child1Data, TraitDataSnapshot child2Data)
Parameters
Type | Name | Description |
---|---|---|
TraitDataSnapshot | child1Data | The data for child 1 |
TraitDataSnapshot | child2Data | The data for child 2 |
Returns
Type | Description |
---|---|
String | The formatted string |
OptimizeForData(TraitDataSnapshot, TraitDataSnapshot)
Modifies the properties so that the data is the optimal data for this relation
Declaration
void OptimizeForData(TraitDataSnapshot child1Data, TraitDataSnapshot child2Data)
Parameters
Type | Name | Description |
---|---|---|
TraitDataSnapshot | child1Data | The data that should be optimal for child 1 after this method is called |
TraitDataSnapshot | child2Data | The data that should be optimal for child 2 after this method is called |