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

    Class MARSEnvironmentManager

    Module responsible for setting up and switching between simulation environments of different types

    Inheritance
    Object
    ScriptableSettingsBase
    ScriptableSettingsBase<MARSEnvironmentManager>
    EditorScriptableSettings<MARSEnvironmentManager>
    MARSEnvironmentManager
    Inherited Members
    EditorScriptableSettings<MARSEnvironmentManager>.instance
    ScriptableSettingsBase<MARSEnvironmentManager>.k_HasCustomPath
    ScriptableSettingsBase<MARSEnvironmentManager>.s_Instance
    ScriptableSettingsBase<MARSEnvironmentManager>.Save(String)
    ScriptableSettingsBase<MARSEnvironmentManager>.GetFilePath()
    ScriptableSettingsBase.k_PathExceptionMessage
    ScriptableSettingsBase.GetInstanceByType(Type)
    ScriptableSettingsBase.OnLoaded()
    Namespace: Unity.MARS
    Syntax
    [ScriptableSettingsPath("Assets/MARS/Settings")]
    public class MARSEnvironmentManager : EditorScriptableSettings<MARSEnvironmentManager>, IModuleDependency<SimulationRecordingManager>, IModuleDependency<QuerySimulationModule>, IModuleDependency<SimulationSceneModule>, IModuleDependency<MARSWorldScaleModule>, IModuleDependency<FunctionalityInjectionModule>, IModuleDependency<SimulatedObjectsManager>, IModuleDependency<SimulationVideoContextManager>, IModule, IProvidesDeviceSimulationSettings, IFunctionalityProvider

    Fields

    EnvironmentLabel

    Asset label used to collect environment prefabs

    Declaration
    public const string EnvironmentLabel = "Environment"
    Field Value
    Type Description
    String

    Properties

    CurrentLoadedPrefabInstanceEnvironment

    Declaration
    public GameObject CurrentLoadedPrefabInstanceEnvironment { get; }
    Property Value
    Type Description
    GameObject

    CurrentSyntheticEnvironmentIndex

    Index of the currently active synthetic environment in the m_EnvironmentPrefabsPaths list

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

    CustomModeSettings

    Declaration
    public SimulationEnvironmentModeSettings CustomModeSettings { get; }
    Property Value
    Type Description
    SimulationEnvironmentModeSettings

    DefaultDeviceStartingPose

    Declaration
    public Pose DefaultDeviceStartingPose { get; }
    Property Value
    Type Description
    Pose

    DeviceStartingPose

    Declaration
    public Pose DeviceStartingPose { get; }
    Property Value
    Type Description
    Pose
    Implements
    IProvidesDeviceSimulationSettings.DeviceStartingPose

    EnvironmentBounds

    Declaration
    public Bounds EnvironmentBounds { get; }
    Property Value
    Type Description
    Bounds
    Implements
    IProvidesDeviceSimulationSettings.EnvironmentBounds

    EnvironmentParent

    The root object that environment objects are added to

    Declaration
    public GameObject EnvironmentParent { get; }
    Property Value
    Type Description
    GameObject

    EnvironmentSetup

    Whether there is currently a simulation environment setup

    Declaration
    public bool EnvironmentSetup { get; }
    Property Value
    Type Description
    Boolean

    HasCustomModeSettings

    Declaration
    public bool HasCustomModeSettings { get; }
    Property Value
    Type Description
    Boolean

    IsFramingEnabled

    Declaration
    public bool IsFramingEnabled { get; }
    Property Value
    Type Description
    Boolean

    IsMovementEnabled

    Declaration
    public bool IsMovementEnabled { get; }
    Property Value
    Type Description
    Boolean
    Implements
    IProvidesDeviceSimulationSettings.IsMovementEnabled

    ModeTypes

    Declaration
    public static GUIContent[] ModeTypes { get; }
    Property Value
    Type Description
    GUIContent[]

    SyntheticEnvironmentName

    Name of the current synthetic environment prefab

    Declaration
    public string SyntheticEnvironmentName { get; }
    Property Value
    Type Description
    String

    SyntheticEnvironmentsExist

    Checks whether any synthetic environment prefab have been found

    Declaration
    public bool SyntheticEnvironmentsExist { get; }
    Property Value
    Type Description
    Boolean

    VoxelSizeFromEnvironment

    Declaration
    public float? VoxelSizeFromEnvironment { get; }
    Property Value
    Type Description
    Nullable<Single>
    Implements
    IProvidesDeviceSimulationSettings.VoxelSizeFromEnvironment

    Methods

    ConnectDependency(QuerySimulationModule)

    Declaration
    public void ConnectDependency(QuerySimulationModule dependency)
    Parameters
    Type Name Description
    QuerySimulationModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    ConnectDependency(SimulatedObjectsManager)

    Declaration
    public void ConnectDependency(SimulatedObjectsManager dependency)
    Parameters
    Type Name Description
    SimulatedObjectsManager dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    ConnectDependency(SimulationRecordingManager)

    Declaration
    public void ConnectDependency(SimulationRecordingManager dependency)
    Parameters
    Type Name Description
    SimulationRecordingManager dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    ConnectDependency(SimulationSceneModule)

    Declaration
    public void ConnectDependency(SimulationSceneModule dependency)
    Parameters
    Type Name Description
    SimulationSceneModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    ConnectDependency(FunctionalityInjectionModule)

    Declaration
    public void ConnectDependency(FunctionalityInjectionModule dependency)
    Parameters
    Type Name Description
    FunctionalityInjectionModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    ConnectSubscriber(Object)

    Declaration
    public void ConnectSubscriber(object obj)
    Parameters
    Type Name Description
    Object obj
    Implements
    IFunctionalityProvider.ConnectSubscriber(Object)

    ForceSetupNextEnvironment(Boolean)

    Sets up the next environment of the current type without the option to save environment changes.

    Declaration
    public void ForceSetupNextEnvironment(bool forward)
    Parameters
    Type Name Description
    Boolean forward

    Direction in which to cycle through environments

    LoadModule()

    Declaration
    public void LoadModule()
    Implements
    IModule.LoadModule()

    LoadProvider()

    Declaration
    public void LoadProvider()
    Implements
    IFunctionalityProvider.LoadProvider()

    SetEnvironmentInfo(MARSEnvironmentInfo)

    Declaration
    public void SetEnvironmentInfo(MARSEnvironmentInfo environmentInfo)
    Parameters
    Type Name Description
    MARSEnvironmentInfo environmentInfo

    TryFrameAllSimViewsOnEnvironment()

    Declaration
    public void TryFrameAllSimViewsOnEnvironment()

    TryFrameSimViewOnEnvironment(ISimulationView, Boolean, Boolean)

    Declaration
    public Quaternion TryFrameSimViewOnEnvironment(ISimulationView simView, bool rotateView, bool instant)
    Parameters
    Type Name Description
    ISimulationView simView
    Boolean rotateView
    Boolean instant
    Returns
    Type Description
    Quaternion

    TrySaveEnvironmentModificationsDialog(Boolean)

    Brings up the save simulated environment dialog if there are changes that are not ignored due to properties that the simulation controls.

    Declaration
    public bool TrySaveEnvironmentModificationsDialog(bool cancelable = true)
    Parameters
    Type Name Description
    Boolean cancelable

    Is the operation that caused the save dialog cancelable.

    Returns
    Type Description
    Boolean

    Returns true if the dialog was completed without canceling.

    TrySetupEnvironmentAndRestartSimulation(Int32)

    Sets up the specified environment based on index in environment list of the current type and then triggers simulation restart.

    Declaration
    public bool TrySetupEnvironmentAndRestartSimulation(int index)
    Parameters
    Type Name Description
    Int32 index

    Specified index of environment

    Returns
    Type Description
    Boolean

    If True, setup of the environment was not canceled.

    TrySetupNextEnvironmentAndRestartSimulation(Boolean)

    Sets up the next environment of the current type and then triggers simulation restart after a save dialog if there are any saveable changes in the environment.

    Declaration
    public bool TrySetupNextEnvironmentAndRestartSimulation(bool forward)
    Parameters
    Type Name Description
    Boolean forward

    Direction in which to cycle through environments

    Returns
    Type Description
    Boolean

    If True, setup of environment and restart was not canceled.

    UnloadModule()

    Declaration
    public void UnloadModule()
    Implements
    IModule.UnloadModule()

    UnloadProvider()

    Declaration
    public void UnloadProvider()
    Implements
    IFunctionalityProvider.UnloadProvider()

    UpdateSimulatedEnvironmentCandidates()

    Declaration
    public void UpdateSimulatedEnvironmentCandidates()

    UpdateSimulationEnvironmentsMenuItem()

    Declaration
    [MenuItem("Window/MARS/Developer/Update Simulation Environments", priority = 2095)]
    public static void UpdateSimulationEnvironmentsMenuItem()

    Events

    EnvironmentChanged

    Declaration
    public event Action EnvironmentChanged
    Event Type
    Type Description
    Action
    Implements
    IProvidesDeviceSimulationSettings.EnvironmentChanged

    onEnvironmentSetup

    Declaration
    public static event Action onEnvironmentSetup
    Event Type
    Type Description
    Action

    Explicit Interface Implementations

    IModuleDependency<MARSWorldScaleModule>.ConnectDependency(MARSWorldScaleModule)

    Declaration
    void IModuleDependency<MARSWorldScaleModule>.ConnectDependency(MARSWorldScaleModule dependency)
    Parameters
    Type Name Description
    MARSWorldScaleModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<SimulationVideoContextManager>.ConnectDependency(SimulationVideoContextManager)

    Declaration
    void IModuleDependency<SimulationVideoContextManager>.ConnectDependency(SimulationVideoContextManager dependency)
    Parameters
    Type Name Description
    Unity.MARS.Simulation.SimulationVideoContextManager dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)