static void DisableEditorRigidBodies( Scene scene )

book_4_sparkGenerated
code_blocksInput

Description

The DisableEditorRigidBodies method is a static extension method for the Scene class. It is used to disable all editor-specific rigid bodies within a given scene. This can be useful when you want to prevent physics interactions or calculations from affecting the scene during editing or when you want to optimize performance by temporarily disabling physics simulations.

Usage

To use the DisableEditorRigidBodies method, you need to have a reference to a Scene object. You can then call this method to disable all editor-specific rigid bodies within that scene.

Example usage:

Scene myScene = SceneManager.GetActiveScene();
SceneExtensions.DisableEditorRigidBodies(myScene);

This will disable all editor-specific rigid bodies in the active scene, ensuring that they do not participate in any physics calculations or interactions.

Example

Scene myScene = SceneManager.GetActiveScene();
SceneExtensions.DisableEditorRigidBodies(myScene);