[英]SceneKit dae file loss texture in device but works fine in simulator
I exported the dae file which contains built-in texture from Maya and added it into Xcode. 我从Maya导出了包含内置纹理的dae文件,并将其添加到Xcode中。 It looks fine in finder and Xcode, even in simulator.
即使在模拟器中,在finder和Xcode中看起来也不错。 However, it's texture doesn't appear in my iPhone.
但是,它的纹理没有出现在我的iPhone中。
Here is the screenshot of my simulator. 这是我的模拟器的屏幕截图。 You can see a colorful chair, wall and gate.
您会看到五颜六色的椅子,墙壁和大门。
This is the screenshot of my iphone. 这是我的iPhone屏幕快照。 Can anyone tell me how can the same code behave differently in simulator and my device?
谁能告诉我相同的代码在模拟器和我的设备中如何表现不同?
It seems something wrong with relative path. 相对路径似乎有问题。 I really didn't figure out this wired problem but my solution is to export dae file without texture, then drag the png into Xcode and set the geometry's diffuse property.
我确实没有弄清楚这个有线问题,但是我的解决方案是导出不带纹理的dae文件,然后将png拖动到Xcode中并设置几何图形的diffuse属性。
If you use Maya and ColladaMaya plugin, try to check "relative path" when exporting dae file. 如果您使用Maya和ColladaMaya插件,请在导出dae文件时尝试检查“相对路径”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.