docs.unity3d.com
    显示 / 隐藏目录

    Class MarsRuntimeUtils

    Inheritance
    Object
    MarsRuntimeUtils
    Namespace: Unity.MARS
    Syntax
    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
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)