- Home /
clientRpc array of System.object loss object type and can't cast the objects
Hi everyone, I try to create a generic method for a clientRpc function so i tried something like that :
[ClientRpcAttribute]
private void RpcCall(object[] parameters)
I tried that but all the object in parameters lost their type and cast give me an error (cannot cast from source type to destination type). But i can cast and get the type of the object in the main (just before call RpcCall). I tried many types and always the same i can't do anything with the object i obtain (and object.type return error too). So have you an idea or maybe an other solution? Thanks!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612084558im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Cast Vector3 to object 1 Answer
'gameObject' is not a member of 'Object'. 1 Answer
Cast object to monobehaviour 1 Answer
Accessing properties from variable 1 Answer
use custom object in RPC 0 Answers