#How to use MultiplayerSpawner custom Spawn function?

1 messages · Page 1 of 1 (latest)

wild latch
#

I'm attempting to setup the MultiplayerSpawner custom spawn function so I can easily sync objects being added/destroyed thru code (Not the auto spawn function :P) but I'm having a crappy time with it since the documentation has minimal information on it.

Here's my attempt (the picture).
It creates and instance on the Host but when the client joins the client get the error "E 0:00:04:201 on_spawn_receive: Parameter "parent" is null.
<C++ Source> modules/multiplayer/scene_replication_interface.cpp:602 @ on_spawn_receive()"
Image

forest aurora
#

Spawn function’s argument is the data (Variant) not a packedscene. Wonder if thats whats causing issues for you

#

Method called on all peers when a custom spawn() is requested by the authority. Will receive the data parameter, and should return a Node that is not in the scene tree.