Is there a way to stream GameObject data from UDP?

Hello There,

My question is very simple. I want to stream GameObject data including all sciprts, meshes, animations, materials, textures etc From UDP.

What I have in mind is a content streaming server which will serialize and stream the data in some form over reliable UDP to the unity client. Unity client will then deserialize and instantiate it.

Also I do not want to store assetbundles as plain files on server side due to security issues. I would like to have a database which stores them as binary.

I guess WWW class handles most of my needs but it streams a plain file over Http which uses TCP so its I guess both slow and unsafe.

So is what I am asking doable in Unity? And what is the best way of doing it?

Any suggestions?

Thanks Alot.

TCP would probably end up being faster than UDP for file transfers. If you use UDP, you'll have to verify your downloaded data; if it's wrong then you'd have to start again or something more sophisticated. To make it work efficiently over UDP, you'd end up building something very similar to TCP, except your network infrastructure wouldn't be optimized for it. I'd stick to downloading assetbundles and if you need to optimize for speed, use a content delivery network to host your files.

Hi, I know this is an old thread, but I think you can achieve that goal using this asset:
File Transfer Server
This asset is able to transfer and receive files of any size through UDP, and also uses the FileManagement asset that simplifies a lot saving binary files.
Best regards.