Unity 通过网络发送大文件

编程入门 行业动态 更新时间:2024-10-24 22:17:45
本文介绍了Unity 通过网络发送大文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我尝试通过 Unity 的网络 (UNet) API 发送一些重量为 mb 的图片.如果尝试 [ClientRpc] 调用,但它会抱怨数据包的大小......当然.我知道我可以使用 WWW 发送此文件,但认为不可能通过 LAN 网络接收此类数据包.是吗?

I try to send a picture weight some mb over Networking (UNet) API of Unity. If try [ClientRpc] call, but it complain about the size of the packet... of course. I know I could use WWW to send this file, but think it is not possible to receive such packet over Lan Networking. It is ?

您知道发送大文件的正确方法是什么吗?还是我真的必须手动拆分成许多包?

Do you know what is there is a proper way to send huge file ? Or do I reeealy have to manually split into many many packet ?

谢谢

推荐答案

我找到了一个 UNet 拆分器,可以使用 UNet (https://answers.unity/questions/1113376/unet-send-big-amount-of-data-over-network-how-to-s.html) 但发送图片大约需要 10 秒~1mb...

I found a UNet splitter to send my photo using UNet (https://answers.unity/questions/1113376/unet-send-big-amount-of-data-over-network-how-to-s.html) but it take about 10s to send a picture ~1mb...

我还使用 .Net 建立了另一个 Socket 连接.文件共享几乎是即时的,但您必须管理另一个连接/断开网络,这是错误和错误以及警告和痛苦的来源(Unity:实时视频流)

I also make another Socket connection using .Net. File sharing is almost instant, but you have to manage another connect/disconnect networking which is source of error and bugs and warning and pain (Unity: Live Video Streaming)

这篇关于Unity 通过网络发送大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-28 17:51:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1176939.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:大文件   网络   Unity

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!