docs.unity3d.com
    Show / Hide Table of Contents

    Class TrackedProperty<TPrimitive>

    Represents a property for a primitive data type.

    Inheritance
    Object
    TrackedProperty<TPrimitive>
    BoolTrackedProperty
    ByteTrackedProperty
    CharTrackedProperty
    DoubleTrackedProperty
    FloatTrackedProperty
    IntTrackedProperty
    LongTrackedProperty
    SByteTrackedProperty
    ShortTrackedProperty
    StringTrackedProperty
    UIntTrackedProperty
    ULongTrackedProperty
    UShortTrackedProperty
    Namespace: UnityEngine.Localization.PropertyVariants.TrackedProperties
    Syntax
    public class TrackedProperty<TPrimitive> : object, ITrackedPropertyValue<TPrimitive>, IStringProperty, ITrackedProperty, ISerializationCallbackReceiver
    Type Parameters
    Name Description
    TPrimitive

    The primitive data type.

    Properties

    PropertyPath

    The property's serialized property path.

    Declaration
    public string PropertyPath { get; set; }
    Property Value
    Type Description
    String
    Implements
    ITrackedProperty.PropertyPath

    Methods

    ConvertFromString(String)

    Declaration
    protected virtual TPrimitive ConvertFromString(string value)
    Parameters
    Type Name Description
    String value
    Returns
    Type Description
    TPrimitive

    ConvertToString(TPrimitive)

    Declaration
    protected virtual string ConvertToString(TPrimitive value)
    Parameters
    Type Name Description
    TPrimitive value
    Returns
    Type Description
    String

    GetValue(LocaleIdentifier, out TPrimitive)

    Declaration
    public bool GetValue(LocaleIdentifier localeIdentifier, out TPrimitive foundValue)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier
    TPrimitive foundValue
    Returns
    Type Description
    Boolean
    Implements
    ITrackedPropertyValue<T>.GetValue(LocaleIdentifier, out T)

    GetValue(LocaleIdentifier, LocaleIdentifier, out TPrimitive)

    Declaration
    public bool GetValue(LocaleIdentifier localeIdentifier, LocaleIdentifier fallback, out TPrimitive foundValue)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier
    LocaleIdentifier fallback
    TPrimitive foundValue
    Returns
    Type Description
    Boolean
    Implements
    ITrackedPropertyValue<T>.GetValue(LocaleIdentifier, LocaleIdentifier, out T)

    GetValueAsString(LocaleIdentifier)

    Declaration
    public string GetValueAsString(LocaleIdentifier localeIdentifier)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier
    Returns
    Type Description
    String
    Implements
    IStringProperty.GetValueAsString(LocaleIdentifier)

    GetValueAsString(LocaleIdentifier, LocaleIdentifier)

    Declaration
    public string GetValueAsString(LocaleIdentifier localeIdentifier, LocaleIdentifier fallback)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier
    LocaleIdentifier fallback
    Returns
    Type Description
    String
    Implements
    IStringProperty.GetValueAsString(LocaleIdentifier, LocaleIdentifier)

    HasVariant(LocaleIdentifier)

    Declaration
    public bool HasVariant(LocaleIdentifier localeIdentifier)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier
    Returns
    Type Description
    Boolean
    Implements
    ITrackedProperty.HasVariant(LocaleIdentifier)

    RemoveVariant(LocaleIdentifier)

    Declaration
    public void RemoveVariant(LocaleIdentifier localeIdentifier)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier

    SetValue(LocaleIdentifier, TPrimitive)

    Declaration
    public void SetValue(LocaleIdentifier localeIdentifier, TPrimitive value)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier
    TPrimitive value
    Implements
    ITrackedPropertyValue<T>.SetValue(LocaleIdentifier, T)

    SetValueFromString(LocaleIdentifier, String)

    Declaration
    public void SetValueFromString(LocaleIdentifier localeIdentifier, string stringValue)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier
    String stringValue
    Implements
    IStringProperty.SetValueFromString(LocaleIdentifier, String)
    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