ドキュメント

Unity Engine

Unity Engine

SimulationMode

A selection of modes that control when Unity executes the physics simulation.
読み終わるまでの所要時間 1 分最終更新 20日前

Definition

  • Type: Enum
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public enum SimulationMode

Remarks

Additional Resources: Physics.simulationMode

Examples

// SimulationMode.FixedUpdate is the default setting in Unity. // Attach this script to a gameObject and enter runtime mode.using UnityEngine;public class ManualPhysicsSimulation : MonoBehaviour{ void Start() { Debug.Log("Current Physics.simulationMode: " + Physics.simulationMode); }}

Fields

Value

Description

FixedUpdateUse this enumeration to instruct Unity to execute the physics simulation immediately after the FixedUpdate.
ScriptUse this enumeration to instruct Unity to execute the physics simulation manually when you call Physics.Simulate.
UpdateUse this enumeration to instruct Unity to execute the physics simulation immediately after Update.