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

    Fields

    LicensingUrl

    Declaration
    public const string LicensingUrl = null
    Field Value
    Type Description
    String

    NotEntitledMessage

    Declaration
    public const string NotEntitledMessage = null
    Field Value
    Type Description
    String

    NotEntitledMessageWithUrl

    Declaration
    public const string NotEntitledMessageWithUrl = null
    Field Value
    Type Description
    String

    Properties

    Instance

    Currently active MARS session singleton instance

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

    island

    Active functionality island for the MARS session

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

    RequestedMaximumFaceCount

    The maximum number of tracked faces requested by this session

    Declaration
    public int RequestedMaximumFaceCount { get; }
    Property Value
    Type Description
    Int32

    requirements

    Functionality requirements for the MARS session

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

    Methods

    CheckCapabilities()

    Check the capabilities required in the MARS session

    Declaration
    public bool CheckCapabilities()
    Returns
    Type Description
    Boolean

    True if changed in the scene

    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

    Override the creation of a new user prefab with an exiting one

    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()
    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