Files
godot-docs/classes/class_physicsserver3dmanager.rst
2025-06-07 03:33:02 +00:00

78 lines
4.0 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicsServer3DManager.xml.
.. _class_PhysicsServer3DManager:
PhysicsServer3DManager
======================
**Inherits:** :ref:`Object<class_Object>`
A singleton for managing :ref:`PhysicsServer3D<class_PhysicsServer3D>` implementations.
.. rst-class:: classref-introduction-group
Description
-----------
**PhysicsServer3DManager** is the API for registering :ref:`PhysicsServer3D<class_PhysicsServer3D>` implementations and for setting the default implementation.
\ **Note:** It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions.
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`register_server<class_PhysicsServer3DManager_method_register_server>`\ (\ name\: :ref:`String<class_String>`, create_callback\: :ref:`Callable<class_Callable>`\ ) |
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_default_server<class_PhysicsServer3DManager_method_set_default_server>`\ (\ name\: :ref:`String<class_String>`, priority\: :ref:`int<class_int>`\ ) |
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_PhysicsServer3DManager_method_register_server:
.. rst-class:: classref-method
|void| **register_server**\ (\ name\: :ref:`String<class_String>`, create_callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_PhysicsServer3DManager_method_register_server>`
Register a :ref:`PhysicsServer3D<class_PhysicsServer3D>` implementation by passing a ``name`` and a :ref:`Callable<class_Callable>` that returns a :ref:`PhysicsServer3D<class_PhysicsServer3D>` object.
.. rst-class:: classref-item-separator
----
.. _class_PhysicsServer3DManager_method_set_default_server:
.. rst-class:: classref-method
|void| **set_default_server**\ (\ name\: :ref:`String<class_String>`, priority\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3DManager_method_set_default_server>`
Set the default :ref:`PhysicsServer3D<class_PhysicsServer3D>` implementation to the one identified by ``name``, if ``priority`` is greater than the priority of the current default implementation.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`