Show / Hide Table of Contents

    Class AppearitionConstants

    Repertory of all the constants used throughout the Appearition SDK. This utility class avoids hard-coding any names, and allows to change any in a single place.

    Inheritance
    System.Object
    AppearitionConstants
    Namespace: Appearition
    Assembly: Appearition.SDK.dll
    Syntax
    public static class AppearitionConstants

    Fields

    DELAY_BETWEEN_EACH_EMS_REACHABILITY_CHECK_IN_SECONDS

    Delay between each check to ensure the program can reach the EMS.

    Declaration
    public const int DELAY_BETWEEN_EACH_EMS_REACHABILITY_CHECK_IN_SECONDS = 50
    Field Value
    Type Description
    System.Int32

    EMS_PING_TIMEOUT_SECONDS

    Delay before an EMS request is considered as timeout.

    Declaration
    public const int EMS_PING_TIMEOUT_SECONDS = 30
    Field Value
    Type Description
    System.Int32

    EMS_UNREACHABLE_ERROR_MESSAGE

    Declaration
    public const string EMS_UNREACHABLE_ERROR_MESSAGE = "This process requires internet connection in order to work. Please try again later."
    Field Value
    Type Description
    System.String

    EMS_UNREACHABLE_NO_LOCAL_DATA_ERROR_MESSAGE

    Declaration
    public const string EMS_UNREACHABLE_NO_LOCAL_DATA_ERROR_MESSAGE = "Internet is not reachable and no offline ApiData is available. No asset can be found."
    Field Value
    Type Description
    System.String

    ENCRYPT_JSON

    Whether or not the JSON files should be encrypted or left as UTF8 text. If true, you can change the encryption key stored in JSON_ENCRYPTION_KEY.

    Declaration
    public const bool ENCRYPT_JSON = false
    Field Value
    Type Description
    System.Boolean

    JSON_ENCRYPTION_KEY

    If EncryptJsonFiles is true, this key will be used to md5 encrypt and decrypt the JSON files.

    Declaration
    public const string JSON_ENCRYPTION_KEY = "SuperToughMd5EncryptionKey"
    Field Value
    Type Description
    System.String

    PROFILE_ANONYMOUS_TOKEN_NAME

    Key used in the UserProfile authenticationTokens dictionary to access the Anonymous token directly.

    Declaration
    public const string PROFILE_ANONYMOUS_TOKEN_NAME = "AnonymousToken"
    Field Value
    Type Description
    System.String

    PROFILE_SESSION_TOKEN_NAME

    Key used in the UserProfile authenticationTokens dictionary to access the Session token directly.

    Declaration
    public const string PROFILE_SESSION_TOKEN_NAME = "SessionToken"
    Field Value
    Type Description
    System.String

    Properties

    RootDirectory

    The root directory where all the cloud data will be saved. Each Handler has their own way of saving data. If you want a different file structure, the first region of each module (where applicable) resolves around file structure. It is possible that the handler itself has a parent class which derives from the BaseHandler, in which case, this parent class will be in charge of the file structure.

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

    Methods

    DeserializeJson<T>(String)

    Method of deserialization to JSON used for requests. If you want to use a different plugin to deserialize JSON, change the content of this method. Do note that JSON encryption (if any) happens at a different location.

    Declaration
    public static T DeserializeJson<T>(string json)
    Parameters
    Type Name Description
    System.String json

    The JSON data.

    Returns
    Type Description
    T

    The deserialized class from the given JSON.

    Type Parameters
    Name Description
    T

    The type of the object to be deserialized.

    SerializeJson<T>(T)

    Method of serialization to JSON used for requests. If you want to use a different plugin to serialize JSON, change the content of this method. Do note that JSON encryption (if any) happens at a different location.

    Declaration
    public static string SerializeJson<T>(T obj)
    Parameters
    Type Name Description
    T obj

    The object to be serialized.

    Returns
    Type Description
    System.String

    The JSON.

    Type Parameters
    Name Description
    T

    The type of the object to be serialized.

    Back to top Appearition SDK for Unity API