godot/doc/classes/MultiplayerSpawner.xml
Fabio Alessandrelli ddee5f6050 Add peer visibility to MultiplayerSynchronizer.
MultiplayerSynchronizers can now be configured to limit their visibility
to a subset of the connected peers, if the synchronized node was spawned
by a MultiplayerSpawner (either automatically or via custom spawn) the
given node will also be despawned remotely.

The replication system doesn't have the logic to handle subspawn
directly, but it is possible to handle them appropriately by manually
updating the visibility of the parent before changing the one of the
nested spawns via the "update_visibility" function.

The visibility of each MultiplayerSynchronizer can be controlled by
adding or remove filters via "[add|remove]_visibility_filter(callable)".

To further optimize the network code, visibility filters can be configured
to be automatically updated during idle or physics frame, or set to always
require manual update (via the "update_visibility" function).
2022-07-20 19:08:35 +02:00

66 lines
1.9 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="MultiplayerSpawner" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="_spawn_custom" qualifiers="virtual">
<return type="Object" />
<argument index="0" name="data" type="Variant" />
<description>
</description>
</method>
<method name="add_spawnable_scene">
<return type="void" />
<argument index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="clear_spawnable_scenes">
<return type="void" />
<description>
</description>
</method>
<method name="get_spawnable_scene" qualifiers="const">
<return type="String" />
<argument index="0" name="path" type="int" />
<description>
</description>
</method>
<method name="get_spawnable_scene_count" qualifiers="const">
<return type="int" />
<description>
</description>
</method>
<method name="spawn">
<return type="Node" />
<argument index="0" name="data" type="Variant" default="null" />
<description>
</description>
</method>
</methods>
<members>
<member name="spawn_limit" type="int" setter="set_spawn_limit" getter="get_spawn_limit" default="0">
</member>
<member name="spawn_path" type="NodePath" setter="set_spawn_path" getter="get_spawn_path" default="NodePath(&quot;&quot;)">
</member>
</members>
<signals>
<signal name="despawned">
<argument index="0" name="scene_id" type="int" />
<argument index="1" name="node" type="Node" />
<description>
</description>
</signal>
<signal name="spawned">
<argument index="0" name="scene_id" type="int" />
<argument index="1" name="node" type="Node" />
<description>
</description>
</signal>
</signals>
</class>