propertycollection - TogetherGames/Public-Unity-CSharp GitHub Wiki
Together::PropertyCollection
The PropertyCollection class contains a list of properties and sub property collections.
string Name
The name of the property collection.
List<> Properties
Stores all the Properties contained in this PropertyCollection.
List<> Children
Stores all the sub PropertyCollections contained in this PropertyCollection.
Gets the property with the specified name if it exists, otherwise returns null.
Returns Property
PropertyCollection.Get( propertyName )
string propertyName
The name of the property to find
--------------------------------------------------------------------------------Gets the value of the property with the specified name if it exists, otherwise this will create the new property with the default value and return that value.
Returns string
PropertyCollection.GetEx( propertyName, defaultValue )
string propertyName
The name of the property to get.
[string](#) defaultValueThe value to return if the property doesn't exist.
--------------------------------------------------------------------------------Sets the value of the property with the specified name if it exists, otherwise creates it with the set value.
Returns Property
PropertyCollection.Set( propertyName, propertyValue )
string propertyName
The name of the property to set
[string](#) propertyValueThe value to set the property to
--------------------------------------------------------------------------------Checks to see whether a property with the specified name exists.
Returns bool
PropertyCollection.HasProperty( propertyName )
string propertyName
The name of the property to check.
--------------------------------------------------------------------------------Encodes the collection to a json string.
Returns string
PropertyCollection.EncodeJson( )