Closed kylemiller3 closed 6 months ago
It has to take one method, as per the documentation
So you should do:
spawner.set_spawn_function(func(_data) -> Node: return Node.new())
spawner.spawn()
To make this a bit easier to debug if someone makes this mistake (and don't read the docs) we could make it display the error from the call
That's interesting. My main project actually did have the first parameter used (it sent a string) and still got the message. Let me recheck.
Unfortunately, I am still getting this problem
Have you set it on all clients? Please upload an updated project id the original MRP contained the invalid function
Also please try with a normal method instead of a lambda
Please also try with a supported version like 4.2.2, 4.2.1 is not supported
Thank you I did not set the function on all clients which was the cause of my error! I might have missed that in the docs.
Tested versions
Godot v4.2.1 [b09f793f5]
System information
Godot v4.2.1.stable - macOS 14.4.1 - Vulkan (Forward+) - integrated Apple M2 - Apple M2 (8 Threads)
Issue description
I want to use a custom spawn function with mutliplayer spawner but it always spawns a null node using custom function
Steps to reproduce
Join a multiplayer session and try to use a custom function to spawn on the authority
I think should work but does not.
Minimal reproduction project (MRP)
Bug.zip