最近在使用unity资源商城插件:Runtime Obj Importer动态加载obj文件时,遇到了这个问题:使用程序在Unity编辑器中运行正常,能够正常加载obj模型,但是发布后运行出现ArgumentNullException: Value cannot be null.无法加载obj模型。
后来通过阅读OBJImpoter里面的README发现里面有这么一句话:You must go to the “Graphics” tab in your project, and add “Standard (Specular Setup)” to the always included shaders.
然后在unity编辑器中点击菜单栏Edit–>Project setting,找到里面的Graphic,往下划到Always Include Shaders,把size加大一个,然后添加Standard (Specular Setup)。
最后点击save to asset即可。