【问题标题】:Unity 3D is not loading new references from MonoDevelopUnity 3D 未从 MonoDevelop 加载新参考
【发布时间】:2016-03-23 23:46:13
【问题描述】:

我正在尝试创建一个新变量:

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

我做错了什么?

【问题讨论】:

  • 您是否必须为此实际下载烦人的 ios 或 android 系统?

标签: c# unity3d mono monodevelop


【解决方案1】:

我遇到过这个问题。实际上,我见过的解决方案很少,但它们仅在 Unity 的几次发布中帮助了我。 以下是链接:

1) http://forum.unity3d.com/threads/unityengine-ui-dll-is-in-timestamps-but-is-not-known-in-assetdatabase.274492/#post-2015083(由 j.robichaud 发布)

2) http://answers.unity3d.com/questions/847994/unityeditorui-reference-missing.html

希望对你有所帮助。 就我而言,只有重新安装才能治愈。 :)

【讨论】:

    猜你喜欢
    • 2011-09-20
    • 1970-01-01
    • 2016-04-07
    • 1970-01-01
    • 2014-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多