Sending Large Files Over RPC

Options
Hello everyone,

I've been using PUN on my project for a couple of months now, and it's been fantastic. I'm currently running into an odd issue, and it's probably my fault, so I would appreciate some guidance.

Here's the situation: I'm trying to accomplish a one-time import of an obj file into all clients across the network. I'm able to get an obj file from the master client, and even import it and instantiate it there, but sending it to other clients is an issue. These files get pretty large, so to bypass the 32767 byte-limit on strings sent over RPC, I'm converting the text of the obj file to a binary array and sending that over an RPC call to a function that converts the binary array back into a string.

Now, this method works, in that it imports the model correctly, but it has the side effect of destroying every other game object I've instantiated over the network using PUN. Some documentation I read for PUN said that the max value of a byte array passed over the network is 2GBs, so I'm not sure why my 23MB obj file is causing this.

Does anyone have an idea of why this might happen and how I can fix it? If you could even point me in the direction of some documentation, I would really appreciate it! If more information is needed to figure this out, I'll happily provide it.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @WalkupAndAway

    If you make a search in the forum you'll find tons of discussions about using Photon to exchange files.

    The most recent one from last month is interesting. Check it out here.