0

我试图在玩家玩游戏时向对方展示他们的 Facebook 个人资料图片。我尝试发送带有[Command][ClientRpcCall]属性的图片,但不起作用。任何想法?

4

1 回答 1

3

谷歌这个问题的答案是微不足道的。

为了让你开始......

[RPC]
void SendTextures(byte[] receivedByte){
 receivedTexture = null;
 receivedTexture = new Texture2D(1, 1);
 receivedTexture.LoadImage(receivedByte);
 GetComponent<Renderer>().material.mainTexture = receivedTexture;
 }

只需在谷歌上搜索 100 多个完整示例和讨论。

这是一个包含许多完整脚本等的巨大讨论

http://forum.unity3d.com/threads/sync-texture-over-network.76538/

尝试谷歌搜索,

Unity3D 通过 RPC 发送图像

Unity3D 通过 RPC 发送 PNG

Unity3D 纹理 RPC

等等

于 2016-02-09T10:26:34.770 回答