项目中出现了资源写不进去的情况,所以打印了资源路径:
<span style="color:#cc0000;">Debug.Log(Application.persistentDataPath);</span>
竟然发现输出空值了......
处理①:新建工程,再次打印:发现输出不为空了,排除编辑器的问题;
处理②:新建工程:将原工程的代码、图片等资源都拷贝进新工程,再次打印:发现输出不为空了,什么鬼?
附上几个回答地址,虽然也没能解决问题:
http://answers.unity3d.com/questions/553681/persistentdatapath.html
http://answers.unity3d.com/questions/870359/applicationpersistentdatapath-returning-null-on-ce.html