案例一:

背景:打包时提示”Error building Player because scripts had compiler errors“和其他代码编译不过的异常提示(”/ToLua/ToLua/Editor/ToLuaMenu.cs(26,7): error CS0246: The type or namespace name `UnityEditor' could not be found“),代码跑到”       BuildPipeline.BuildStreamedSceneAssetBundle“就中断了。unity——打包问题积累

原因:在非Edtor目录下使用了UnityEditor代码(看起来在Plugin中嵌套Editor文件夹,Editor文件夹不会起作用的)。
解决方案:
将使用到UnityEditor相关的代码放到未嵌套在Plugins下的Editor目录下
(实际上Assets\Plugins\LuaPlugin\ToLua\Editor挪到Assets\Editor\ToLua)
参考:
http://answers.unity3d.com/questions/396311/error-while-build-app-game-with-assetbundle-menu-c.html
http://answers.unity3d.com/questions/316805/unityeditor-namespace-not-found.html
同异常的其他情景:
https://www.reddit.com/r/Unity3D/comments/27i9lx/using_unity_integration_package_for_oculus_rift/
http://blog.csdn.net/wldrswgzmb/article/details/50522247


相关文章:

  • 2021-06-19
  • 2022-01-08
  • 2021-12-19
  • 2021-12-05
  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2021-09-26
  • 2021-07-29
  • 2021-05-18
  • 2021-06-12
  • 2022-01-20
相关资源
相似解决方案