Interface IStringProperty
Represents a property whose value can be converted from and to a string.
Namespace: UnityEngine.Localization.PropertyVariants.TrackedProperties
Syntax
public interface IStringProperty : ITrackedProperty
Methods
GetValueAsString(LocaleIdentifier)
Returns the value for the LocaleIdentifier as a string representation.
Declaration
string GetValueAsString(LocaleIdentifier localeIdentifier)
Parameters
Type | Name | Description |
---|---|---|
LocaleIdentifier | localeIdentifier | The LocaleIdentifier whose variant should be returned. |
Returns
Type | Description |
---|---|
String | The variants value a string or |
GetValueAsString(LocaleIdentifier, LocaleIdentifier)
Returns the value for the LocaleIdentifier as a string representation, uses the fallback if a variant does not exist.
Declaration
string GetValueAsString(LocaleIdentifier localeIdentifier, LocaleIdentifier fallback)
Parameters
Type | Name | Description |
---|---|---|
LocaleIdentifier | localeIdentifier | The LocaleIdentifier whose variant should be returned. |
LocaleIdentifier | fallback | If no variant exists for the LocaleIdentifier then the fallback will be used. |
Returns
Type | Description |
---|---|
String | The variant or fallback value a string or |
SetValueFromString(LocaleIdentifier, String)
Assigns a value for the chosen LocaleIdentifier.
Declaration
void SetValueFromString(LocaleIdentifier localeIdentifier, string value)
Parameters
Type | Name | Description |
---|---|---|
LocaleIdentifier | localeIdentifier | The LocaleIdentifier the variant should be applied to. |
String | value | The variant value for the LocaleIdentifier. |