问题描述
我尝试通过 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.com/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.com/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 通过网络发送大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!