docs.unity3d.com
    Show / Hide Table of Contents

    Class MarsRuntimeUtils

    Inheritance
    Object
    MarsRuntimeUtils
    Namespace: Unity.MARS.MARSUtils
    Syntax
    [MovedFrom("Unity.MARS")]
    public static class MarsRuntimeUtils

    Methods

    GetActiveCamera(Boolean)

    If simulating in edit mode, returns the simulated camera else returns the camera associated to the MarsSession through the MarsCamera camera reference.

    Declaration
    public static Camera GetActiveCamera(bool findFallbackCamera = false)
    Parameters
    Type Name Description
    Boolean findFallbackCamera

    If the active session camera is null, then it will try and return the main camera and if that is null will find a Camera object.

    Returns
    Type Description
    Camera

    GetMarsSessionInActiveScene()

    Returns the first MarsSession found in the active scene

    Declaration
    public static MARSSession GetMarsSessionInActiveScene()
    Returns
    Type Description
    MARSSession

    The first MarsSession found in the active scene, or null if none exists

    GetMarsSessionInScene(Scene)

    Returns the first MarsSession found in the given scene

    Declaration
    public static MARSSession GetMarsSessionInScene(Scene scene)
    Parameters
    Type Name Description
    Scene scene

    The scene to search

    Returns
    Type Description
    MARSSession

    The first MarsSession found in the given scene, or null if none exists

    GetSessionAssociatedCamera(Boolean)

    Returns the camera associated to the MarsSession through the MarsCamera camera reference.

    Declaration
    public static Camera GetSessionAssociatedCamera(bool findFallbackCamera = false)
    Parameters
    Type Name Description
    Boolean findFallbackCamera

    If the active session camera is null, then it will try and return the main camera and if that is null will find a Camera object.

    Returns
    Type Description
    Camera

    HasMarsBehaviors(Scene)

    Checks if the given scene contains any MARS behaviors

    Declaration
    public static bool HasMarsBehaviors(Scene scene)
    Parameters
    Type Name Description
    Scene scene

    The scene to check

    Returns
    Type Description
    Boolean

    True if the scene has any MARS behaviors, false otherwise

    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