【发布时间】:2020-07-26 06:32:07
【问题描述】:
对于机器人模拟,我使用带有数据的 csv 文件。我读取数据如下:
string dbPath = ""; string realPath; // Android string oriPath = System.IO.Path.Combine(Application.streamingAssetsPath, "Data.csv");
// Android only use WWW to read file
WWW reader = new WWW(oriPath);
while (!reader.isDone) { }
realPath = Application.persistentDataPath + "/db";
System.IO.File.WriteAllBytes(realPath, reader.bytes);
dbPath = realPath;
using (StreamReader sr = new StreamReader(dbPath))
{...}
在 Unity 编辑器版本中,模拟按预期工作,但在 Android 上,机器人的手臂以一种奇怪的方式移动,正如您在视频中看到的那样。我比较了两个 db 文件(在 Windows 和 Android 路径上),内容是相同的。奇怪的动作可能是什么原因?
编辑https://streamable.com/7z4qob安卓https://streamable.com/rv4nm2
谢谢!
【问题讨论】:
标签: android unity3d simulation robot artifacts