Before updating to Windows 10 you may need to return your Pro license. More information here

Send array of transforms via RPC. [C#]

I need to send an array of transforms over the network using an RPC call. This must be done in such a way so that the receiving end can do whatever it wishes to those transforms.

I'm simply baffled as to how to do it. Sending it as a Transform[] returns the error "Sending RPC failed as parameters were invalid. Expecting 1 parameter, received 5".

Sending them as an Object[] seems to work, but for some reason trying to convert them back to transforms, and Network.Delete them either deletes the last one, or deletes none of them at all, returning a typecast error.

Theoretically converting them to a byte array could work, but there is nothing on converting an array to a byte array in c# on the net.

I'm baffled!

more ▼

asked Jan 23, 2011 at 07:05 PM

avatar image

1.6k 59 61 76

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

If you look in the manual it says "Valid RPC parameters are int, float, string, NetworkPlayer, NetworkViewID, Vector3 and Quaternion.". So no Transform and no [].

If you need the Transforms as references you will have to construct something with NetworkPlayer or NetworkID. If you are only interested in the values of the transforms and don't want to modify them you can send the three parameters (Position, Rotation, Scale) via RPC.

more ▼

answered Apr 07, 2011 at 03:43 PM

avatar image

6.6k 119 110 171

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jan 23, 2011 at 07:05 PM

Seen: 3645 times

Last Updated: Jan 23, 2011 at 07:05 PM