docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AuthenticationExtensions

    Authentication extension methods

    Inheritance
    object
    AuthenticationExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Authentication
    Assembly: Unity.Services.Authentication.dll
    Syntax
    public static class AuthenticationExtensions

    Methods

    SetProfile(InitializationOptions, string)

    An extension to set the profile name to use. The profile is a namespace in PlayerPrefs where the values from the Authentication SDK are saved. Setting a profile name in this way is optional, by default the value "default" is used. The profile name must be alphanumeric, '-', or '_', and no longer than 30 characters.

    Declaration
    public static InitializationOptions SetProfile(this InitializationOptions options, string profile)
    Parameters
    Type Name Description
    InitializationOptions options

    The InitializationOptions object to modify

    string profile

    The profile name to use

    Returns
    Type Description
    InitializationOptions

    Return options. Fluent interface pattern to make it easier to chain set options operations.

    Exceptions
    Type Condition
    AuthenticationException

    the method will fail with an AuthenticationException if an invalid profile name is passed

    • Throws with ErrorCode ClientInvalidProfile if the profile name is invalid.
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)