You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to instantiate an object for host and client. Object takes in a custom resource and sets texture based on above resource on _ready. Since Multiplayer Synchronizer does not synchronize resources/objects, I moved _ready code block into an RPC setter function which will set the custom resource in the object (spawned across peers with Multiplayer Spawner) for all peers. The RPC setter takes in a resource as argument. Unexpected behavior resulted: stepping into RPC setter, the passed resource was "null" for client, but not for host, for whom the resource was populated as normal.
Steps to reproduce
Spawn 2 instances in debug
Click "Host" with 1st window. Click "Join" with 2nd window.
Walk players so they face each other.
Hit "Tab" to open inventory, click on any item to grab, hover grabbed item off inventory screen as if to place on level, hit RMB to spawn in level.
Should trigger error.
Minimal reproduction project (MRP)
Relevant code is in _on_inventory_interface_drop_slot_data (spawns object) in world_debug.gd and set_slot_data in pick_up.gd MRP.zip
The text was updated successfully, but these errors were encountered:
Calinou
changed the title
Resource argument passed through RPC comes out as "null" on client
Print an error when attempting to pass an Object or Callable through an RPC
Jul 9, 2024
Tested versions
Reproducible in 4.2.2
System information
Windows 11
Issue description
I'm trying to instantiate an object for host and client. Object takes in a custom resource and sets texture based on above resource on _ready. Since Multiplayer Synchronizer does not synchronize resources/objects, I moved _ready code block into an RPC setter function which will set the custom resource in the object (spawned across peers with Multiplayer Spawner) for all peers. The RPC setter takes in a resource as argument. Unexpected behavior resulted: stepping into RPC setter, the passed resource was "null" for client, but not for host, for whom the resource was populated as normal.
Steps to reproduce
Minimal reproduction project (MRP)
Relevant code is in _on_inventory_interface_drop_slot_data (spawns object) in world_debug.gd and set_slot_data in pick_up.gd
MRP.zip
The text was updated successfully, but these errors were encountered: