发布网友 发布时间:2022-04-26 18:59
共2个回答
懂视网 时间:2022-04-30 00:36
网上找到一篇文章:
一、Remove the UI System 1、Close Unity 2、Access on Unity's installation folder on Explorer or Finder on mac (On mac rightclick on the App and click on ShowPackageContent). 3、Locate the folder named "UnityExtensions/Unity". (On Mac: "Content/UnityExtensions/Unity". 4、In this folder you will notice a folder named "GUISystem" 5、Move this folder from the installation folder (you may need administrator rights). Yes, right. Do not just rename it or move it out the "Unity" folder, Unity will find it... I assure you... 二、Have Unity notice the change 1、Open Unity again in the project you had the issue 2、You may have an error "GameObject (named 'Canvas') references runtime script in scene file. Fixing!" 3、Close Unity, DO NO SAVE ANY SCENE 三、Restore the UI System 1、Make sure Unity is closed 2、Restore the "GUISystem" to its previous location 3、Open Unity again 4、Unity will compile script 5、You will see the warning "Timestamps (19) and assets (21) maps out of sync." and the errors "Asset '' is in assets but has no assettimestamp..." just ignore them 6、Everything should be ok again
1、关闭Unity
先找到UnityExtensions/Unity下的GUISystem目录,删除它,一定要删除,不要移动到别的文件夹
2、打开Unity
出现"GameObject(named ‘Canvas‘)的错误信息,修复它,关闭Unity
3、再从回收站将GUISystem恢复到原来目录
从新打开Unity即可
UnityEditor.UI.dll' is in timestamps but is not known in assetdatabase
标签:unity3d
热心网友 时间:2022-04-29 21:44
使用自己编译的uGUI
1.首选下载uGUI代码,如何下载参考相关文档。
2.使用vs2012打开解决方案UISystem.sln,看到三个工程。
UnityEditor.UI工程:生成Edtior/UnityEditor.UI.dll,主要是包含各UGUI控件在Editor的Inspector功能。
UnityEngine.UI工程:生成Standalone/UnityEngine.UI.dll,主要是UGUI在发布包中使用的功能。
UnityEngine.UI-Editor工程:生成UnityEngine.UI.dll,主要是UGUI在编辑器中使用的功能。
3.修改DLL输出路径
UnityEditor.UI工程输出路径:d:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem\Editor\
UnityEngine.UI工程输出路径:d:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem\Standalone\
UnityEngine.UI-Editor工程输出路径:d:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem\
到这步按F7就可以把uGUI代码编译出的dll给unity使用。
uGUI单步调试
1.使用工具pdb2mdb.exe生成mdb文件
不过在Unity中还是无法调试到uGUI的源代码中,因为刚刚编译出来的调试信息文件是pdb,而mono的调试信息文件是mdb。因此我们需要用pdb2mdb工具将它进行。转工具:d:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5\pdb2mdb.exe
把CMD工作目录转到d:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem。然后开始转换。
但还是报错了:
未经处理的异常: System.IO.FileNotFoundException: 未能加载文件或程序集“Mono.Cec
il, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756”或它的某
一个依赖项。系统找不到指定的文件。
在 Pdb2Mdb.Driver.Main(String[] args)
解决方法:
下一个新的pdb2mdb.exe工具
https://gist.github.com/jbevain/ba23149da8369e4a966f
终于成功了:
可以看到目录d:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem\下生成了UnityEngine.UI.dll.mdb文件。
2.开始单步调试:
A.下好断点。
B.运行Unity3D测试例子。
C.把dll附加到unity中去
4.做相应操作触发断点。(我这里是点击测试例子的按钮)