I'm trying to create a new variable with:
public Text customText;
To use the type Text
, I need to include:
using UnityEngine;
using UnityEngine.UI;
But this reference doesn't exist in my list of references on MonoDevelop.
I download it manually and added the reference manually; now I can use the Text
type and import the UnityEngine.UI
.
Well, here is the issue. When I compile my solution, on MonoDevelop I get this error:
Error: The compiler appears to have crashed. Check the build output pad for details. (Assembly-CSharp)
.
But on Unity3D I get the error:
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?
The dll UnityEngine
is by default in the list of references, but not the UnityEngine.UI
.
What I'm doing wrong?
I've faced this problem. Actually i've seen few solutions, but they helped me for only few launches of Unity. Here is the links:
1) http://forum.unity3d.com/threads/unityengine-ui-dll-is-in-timestamps-but-is-not-known-in-assetdatabase.274492/#post-2015083 (post by j.robichaud)
2) http://answers.unity3d.com/questions/847994/unityeditorui-reference-missing.html
I hope any of it will help you. In my case only reinstall was the cure. :)