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

    Class SimulatedObjectsManager

    Module responsible for copying simulatable objects to the simulation scene, mapping between these copies and their originals, and checking for changes to the original objects

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

    Fields

    SimulatedObjectHideFlags

    Declaration
    public const HideFlags SimulatedObjectHideFlags = HideFlags.DontSave
    Field Value
    Type Description
    HideFlags

    Properties

    SimulatableBehavioursBlockingResyncCount

    Number of behaviours that are currently blocking auto resync

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

    SimulatedCamera

    Declaration
    public Camera SimulatedCamera { get; }
    Property Value
    Type Description
    Camera

    SimulatedContentRoot

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

    SimulationSyncedWithScene

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

    Methods

    AddSpawnedObjectToSimulation(GameObject)

    Adds the given Game Object to the current simulation and starts running its ISimulatable behaviours

    Declaration
    public void AddSpawnedObjectToSimulation(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    The Game Object to add to simulation

    ConnectDependency(MARSEnvironmentManager)

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

    ConnectDependency(QuerySimulationModule)

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

    ConnectDependency(SceneWatchdogModule)

    Declaration
    public void ConnectDependency(SceneWatchdogModule dependency)
    Parameters
    Type Name Description
    SceneWatchdogModule 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)

    DirtySimulatableScene()

    Sets flags that the active scene has been modified and simulation should restart. This guarantees that the scene contents will be copied to the simulation scene for the next simulation.

    Declaration
    public void DirtySimulatableScene()

    GetCopiedSimulatable(ISimulatable)

    Returns the simulation scene copy of an ISimulatable, if there is one

    Declaration
    public ISimulatable GetCopiedSimulatable(ISimulatable original)
    Parameters
    Type Name Description
    ISimulatable original

    The original version of a copied ISimulatable

    Returns
    Type Description
    ISimulatable

    GetCopiedTransform(Transform)

    Returns the simulation scene copy of a Transform, if there is one

    Declaration
    public Transform GetCopiedTransform(Transform original)
    Parameters
    Type Name Description
    Transform original

    The original version of a copied Transform

    Returns
    Type Description
    Transform

    GetOriginalObject(Object)

    Returns the original scene copy of a simulation scene Object, if there is one being managed

    Declaration
    public Object GetOriginalObject(Object copy)
    Parameters
    Type Name Description
    Object copy

    The copied version of an object

    Returns
    Type Description
    Object

    GetOriginalSimulatable(ISimulatable)

    Returns the original version of an ISimulatable copied to the simulation scene, if there is one

    Declaration
    public ISimulatable GetOriginalSimulatable(ISimulatable copy)
    Parameters
    Type Name Description
    ISimulatable copy

    The ISimulatable in the simulation scene

    Returns
    Type Description
    ISimulatable

    GetOriginalTransform(Transform)

    Returns the original scene copy of a simulation scene Transform, if there is one

    Declaration
    public Transform GetOriginalTransform(Transform copy)
    Parameters
    Type Name Description
    Transform copy

    The copied version of a Transform

    Returns
    Type Description
    Transform

    IsSimulatedObject(GameObject)

    Checks whether an object is a simulated object.

    Declaration
    public static bool IsSimulatedObject(GameObject obj)
    Parameters
    Type Name Description
    GameObject obj

    The gameobject to check.

    Returns
    Type Description
    Boolean

    LoadModule()

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

    UnloadModule()

    Declaration
    public void UnloadModule()
    Implements
    IModule.UnloadModule()
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)