Unity 3D 没有从 MonoDevelop 加载新的引用
Unity 3D is not loading new references from MonoDevelop
我正在尝试创建一个新变量:
public Text customText;
要使用类型 Text
,我需要包括:
using UnityEngine;
using UnityEngine.UI;
但是我在 MonoDevelop 上的参考列表中不存在此参考。
我手动下载并手动添加参考;现在我可以使用 Text
类型并导入 UnityEngine.UI
.
嗯,问题来了。当我编译我的解决方案时,在 MonoDevelop 上我得到这个错误:
Error: The compiler appears to have crashed. Check the build output pad for details. (Assembly-CSharp)
.
但在 Unity3D 上我得到错误:
Assets/UI/Scripts/HudController.cs(2,19): error CS0234: The type or namespace name `UI' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
默认情况下,dll UnityEngine
在引用列表中,但不在 UnityEngine.UI
。
我做错了什么?
我遇到过这个问题。实际上我看到的解决方案很少,但它们只帮助我启动了几次 Unity。
这是链接:
1) http://forum.unity3d.com/threads/unityengine-ui-dll-is-in-timestamps-but-is-not-known-in-assetdatabase.274492/#post-2015083(post 来自 j.robichaud)
2) http://answers.unity3d.com/questions/847994/unityeditorui-reference-missing.html
希望对您有所帮助。
就我而言,只有重新安装才是解决之道。 :)
我正在尝试创建一个新变量:
public Text customText;
要使用类型 Text
,我需要包括:
using UnityEngine;
using UnityEngine.UI;
但是我在 MonoDevelop 上的参考列表中不存在此参考。
我手动下载并手动添加参考;现在我可以使用 Text
类型并导入 UnityEngine.UI
.
嗯,问题来了。当我编译我的解决方案时,在 MonoDevelop 上我得到这个错误:
Error: The compiler appears to have crashed. Check the build output pad for details. (Assembly-CSharp)
.
但在 Unity3D 上我得到错误:
Assets/UI/Scripts/HudController.cs(2,19): error CS0234: The type or namespace name `UI' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
默认情况下,dll UnityEngine
在引用列表中,但不在 UnityEngine.UI
。
我做错了什么?
我遇到过这个问题。实际上我看到的解决方案很少,但它们只帮助我启动了几次 Unity。 这是链接:
1) http://forum.unity3d.com/threads/unityengine-ui-dll-is-in-timestamps-but-is-not-known-in-assetdatabase.274492/#post-2015083(post 来自 j.robichaud)
2) http://answers.unity3d.com/questions/847994/unityeditorui-reference-missing.html
希望对您有所帮助。 就我而言,只有重新安装才是解决之道。 :)