docs.unity3d.com
    Show / Hide Table of Contents

    Interface IStringProperty

    Represents a property whose value can be converted from and to a string.

    Inherited Members
    ITrackedProperty.PropertyPath
    ITrackedProperty.HasVariant(LocaleIdentifier)
    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 null if an override does not exist for the LocaleIdentifier.

    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 null if an override could not be found.

    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.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023