When you add a component on a gameobject at runtime, then you call an rpc in the component, the host throw an error like this:
OnObjectMessage: Unknown Component f951a37f-49fe-46b0-bbdc-d40297a59119 on Phone for RPC LoadConversationsRpcRequest
Phone is the component that call the rpc (Added from the editor)
LoadConversationsRpcRequest function that trigger the error. This function is in the component ConversationService (This component is added at runtime)
If i call the function from the host, the rpc is called on other client as expected
If i call the function from a new game instance, the rpc is called but trigger an error
To Reproduce
Create a component with an rpc function
Add the component at runtime on a gameobject
Call the rpc function from a new game instance, the host will throw an error
Expected behavior
The component should be networked correctly and rpc should work as expected
Media/Files
No response
Additional context
If you can't repro this issue, i can make a repro for you
Describe the bug
When you add a component on a gameobject at runtime, then you call an rpc in the component, the host throw an error like this: OnObjectMessage: Unknown Component f951a37f-49fe-46b0-bbdc-d40297a59119 on
Phone
for RPCLoadConversationsRpcRequest
Phone
is the component that call the rpc (Added from the editor)LoadConversationsRpcRequest
function that trigger the error. This function is in the componentConversationService
(This component is added at runtime)To Reproduce
Expected behavior
The component should be networked correctly and rpc should work as expected
Media/Files
No response
Additional context
If you can't repro this issue, i can make a repro for you