Class MARSSession | MARS | 1.0.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class MARSSession

    Represents the runtime behavior of MARS. One of these must be in any scene with MARS content for it to function properly

    Inheritance
    Object
    MARSSession
    Namespace: Unity.MARS
    Syntax
    public class MARSSession : MonoBehaviour, IUsesFunctionalityInjection, IFunctionalitySubscriber<IProvidesFunctionalityInjection>, IFunctionalitySubscriber

    Fields

    LicensingUrl

    Declaration
    public const string LicensingUrl = "https://www.unity.com/mars"
    Field Value
    Type Description
    String

    NotEntitledMessage

    Declaration
    public const string NotEntitledMessage = "No MARS subscription found for the current user. Users must purchase a subscription from the online store."
    Field Value
    Type Description
    String

    NotEntitledMessageWithUrl

    Declaration
    public const string NotEntitledMessageWithUrl = "No MARS subscription found for the current user. Users must purchase a subscription from the online store. Please go to https://www.unity.com/mars"
    Field Value
    Type Description
    String

    Properties

    Instance

    Declaration
    public static MARSSession Instance { get; }
    Property Value
    Type Description
    MARSSession

    island

    Declaration
    public FunctionalityIsland island { get; }
    Property Value
    Type Description
    FunctionalityIsland

    requirements

    Declaration
    public Capabilities requirements { get; }
    Property Value
    Type Description
    Capabilities

    Methods

    CheckCapabilities()

    Declaration
    public bool CheckCapabilities()
    Returns
    Type Description
    Boolean

    EnsureRuntimeState(Transform)

    Ensures that a MARS Scene has all required components and configuration

    Declaration
    public static void EnsureRuntimeState(Transform overrideUserRef = null)
    Parameters
    Type Name Description
    Transform overrideUserRef

    EnsureSessionInActiveScene()

    Ensures that the active scene has a MARS Session

    Declaration
    public static MARSSession EnsureSessionInActiveScene()
    Returns
    Type Description
    MARSSession

    Thew newly created MARSSession, or null if a session previously exists

    FindExistingInstance()

    Search all loaded scenes for MARSSession objects and set the first one to the Instance property, if any exist

    Declaration
    public static void FindExistingInstance()

    Explicit Interface Implementations

    IFunctionalitySubscriber<IProvidesFunctionalityInjection>.provider

    Declaration
    IProvidesFunctionalityInjection IFunctionalitySubscriber<IProvidesFunctionalityInjection>.provider { get; set; }
    Returns
    Type Description
    IProvidesFunctionalityInjection
    Implements
    IFunctionalitySubscriber<TProvider>.provider
    Back to top
    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