【发布时间】: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