Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新版本Unity中重新引用UnityEngine后Hotfix仍然报错 #40

Closed
SolarianZ opened this issue Jan 23, 2018 · 1 comment
Closed

新版本Unity中重新引用UnityEngine后Hotfix仍然报错 #40

SolarianZ opened this issue Jan 23, 2018 · 1 comment

Comments

@SolarianZ
Copy link

系统环境:
Windows 10 专业版 64位
Unity 2017.3.0f3
Visual Studio Community 2017 15.5.3

Hotfix中重新引用C:\Program Files\Unity2017\Editor\Data\Managed\UnityEngine\UnityEngine.dll后,会报错找不到GameObject和Object:

错误 CS0246 未能找到类型或命名空间名“GameObject”(是否缺少 using 指令或程序集引用?) Unity.Hotfix D:\Projects\Com\ET\Unity\Hotfix\UI\UILobby\Factory\UILobbyFactory.cs

改成引用C:\Program Files\Unity2017\Editor\Data\Managed\UnityEngine.dll后,会报错:

错误 CS0012 类型“MonoBehaviour”在未引用的程序集中定义。必须添加对程序集“UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”的引用。 Unity.Hotfix D:\Projects\Com\ET\Unity\Hotfix\UI\UILobby\Component\UILobbyComponent.cs

请问这是什么原因?

@SolarianZ
Copy link
Author

解决了,要引用C:\Program Files\Unity2017\Editor\Data\Managed\UnityEngine\UnityEngine.dll,再添加对C:\Program Files\Unity2017\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll的引用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant