docs.unity3d.com
    Show / Hide Table of Contents

    Class AddressablesRuntimeProperties

    Supports the evaluation of embedded runtime variables in addressables locations

    Inheritance
    Object
    AddressablesRuntimeProperties
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.AddressableAssets.Initialization
    Syntax
    public static class AddressablesRuntimeProperties

    Methods

    ClearCachedPropertyValues()

    This will clear all PropertyValues that have been cached. This includes all values set by SetPropertyValue(String, String) as well as any reflection-evaluated properties.

    Declaration
    public static void ClearCachedPropertyValues()

    EvaluateProperty(String)

    Evaluates a named property using cached values and static public fields and properties. Be aware that a field or property may be stripped if not referenced anywhere else.

    Declaration
    public static string EvaluateProperty(string name)
    Parameters
    Type Name Description
    String name

    The property name.

    Returns
    Type Description
    String

    The value of the property. If not found, the name is returned.

    EvaluateString(String)

    Evaluates all tokens deliminated by '{' and '}' in a string and evaluates them with the EvaluateProperty method.

    Declaration
    public static string EvaluateString(string input)
    Parameters
    Type Name Description
    String input

    The input string.

    Returns
    Type Description
    String

    The evaluated string after resolving all tokens.

    EvaluateString(String, Char, Char, Func<String, String>)

    Evaluates all tokens deliminated by the specified delimiters in a string and evaluates them with the supplied method.

    Declaration
    public static string EvaluateString(string inputString, char startDelimiter, char endDelimiter, Func<string, string> varFunc)
    Parameters
    Type Name Description
    String inputString

    The string to evaluate.

    Char startDelimiter

    The start token delimiter.

    Char endDelimiter

    The end token delimiter.

    Func<String, String> varFunc

    Func that has a single string parameter and returns a string.

    Returns
    Type Description
    String

    The evaluated string.

    SetPropertyValue(String, String)

    Predefine a runtime property.

    Declaration
    public static void SetPropertyValue(string name, string val)
    Parameters
    Type Name Description
    String name

    The property name.

    String val

    The property value.

    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