The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Sending Large Files Over RPC

WalkupAndAway
2015-11-19 16:48:32

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
2015-11-21 06:39:00

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.

Back to top