Class ProfileValueReference | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class ProfileValueReference

    Used to store references to profile variables. This class is intended to be used for fields in user scripts, specifically ones that subclass AddressableAssetGroupSchema.

    Inheritance
    System.Object
    ProfileValueReference
    Namespace: UnityEditor.AddressableAssets.Settings
    Syntax
    [Serializable]
    public class ProfileValueReference

    Fields

    OnValueChanged

    This delegate will be invoked when the reference profile id changes. This will NOT be invoked when the actual profile value itself changes.

    Declaration
    public Action<ProfileValueReference> OnValueChanged
    Field Value
    Type Description
    System.Action<ProfileValueReference>

    Properties

    Id

    Get the profile variable id.

    Declaration
    public string Id { get; }
    Property Value
    Type Description
    System.String

    Methods

    GetName(AddressableAssetSettings)

    Get the profile variable name that is referenced.

    Declaration
    public string GetName(AddressableAssetSettings settings)
    Parameters
    Type Name Description
    AddressableAssetSettings settings

    The settings object.

    Returns
    Type Description
    System.String

    The name of the profile variable name.

    GetValue(AddressableAssetProfileSettings, String)

    Evaluate the profile value using the provided profile settings object and a profile id.

    Declaration
    public string GetValue(AddressableAssetProfileSettings profileSettings, string profileId)
    Parameters
    Type Name Description
    AddressableAssetProfileSettings profileSettings

    The profile settings object.

    System.String profileId

    The profile id.

    Returns
    Type Description
    System.String

    The evaluated string stored in the referenced profile variable.

    GetValue(AddressableAssetSettings)

    Evaluate the profile value using the provided settings object.

    Declaration
    public string GetValue(AddressableAssetSettings settings)
    Parameters
    Type Name Description
    AddressableAssetSettings settings

    The settings object to evaluate with. The activeProfileId will be used.

    Returns
    Type Description
    System.String

    The evaluated string stored in the referenced profile variable.

    SetVariableById(AddressableAssetSettings, String)

    Set the profile variable id using the id of the variable.

    Declaration
    public bool SetVariableById(AddressableAssetSettings settings, string id)
    Parameters
    Type Name Description
    AddressableAssetSettings settings

    The settings object.

    System.String id

    The id of the profile variable to set.

    Returns
    Type Description
    System.Boolean

    True if the profile data is found and set, false otherwise.

    SetVariableByName(AddressableAssetSettings, String)

    Set the profile variable id using the name of the variable.

    Declaration
    public bool SetVariableByName(AddressableAssetSettings settings, string name)
    Parameters
    Type Name Description
    AddressableAssetSettings settings

    The settings object.

    System.String name

    The name of the profile variable to set.

    Returns
    Type Description
    System.Boolean

    True if the profile data is found and set, false otherwise.

    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX