docs.unity.cn
    Show / Hide Table of Contents

    Struct SimulationSingleton

    A simulation singleton. Use it to get simulation used by the physics engine. Call (SystemBase|SystemAPI|EntityQuery).GetSingleton<SimulationSingleton() to get read-only access. Call (SystemBase|SystemAPI|EntityQuery).GetSingletonRW<SimulationSingleton() to get read-write access.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Physics
    Syntax
    public struct SimulationSingleton : IComponentData, IQueryTypeParameter

    Fields

    Type

    The simulation type.

    Declaration
    public SimulationType Type
    Field Value
    Type Description
    SimulationType

    Methods

    AsSimulation()

    Converts this object to a simulation.

    Declaration
    public Simulation AsSimulation()
    Returns
    Type Description
    Simulation

    A Simulation.

    InitializeFromSimulation(ref Simulation)

    Initializes this object from the given simulation.

    Declaration
    public void InitializeFromSimulation(ref Simulation simulation)
    Parameters
    Type Name Description
    Simulation simulation

    [in,out] The simulation.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023