浏览代码

Use Allocator.Persistent as sending data can take more than 4 frames.

/3.1
Tim Mowrer 6 年前
当前提交
82fe6349
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      Assets/Scenes/ARCollaborationData/TCPConnection.cs

4
Assets/Scenes/ARCollaborationData/TCPConnection.cs


if (collaborationData.valid)
{
using (collaborationData)
using (var bytes = collaborationData.ToNativeArray(Allocator.TempJob))
using (var bytes = collaborationData.ToNativeArray(Allocator.Persistent))
// We use Allocator.Persistent above because sending data
// can take several frames, so TempJob cannot be used.
SendData(stream, bytes);
}
}

正在加载...
取消
保存