2013-10-17 29 views
1

當我把我的標準資產文件夾Demo.cs我收到此錯誤:`的UILabel」找不到

Assets/Standard Assets/Demo.cs(130,17): error CS0246: The type or namespace name 'UILabel' could not be found. Are you missing a using directive or an assembly reference?

,當我把Demo.cs資產文件夾上面的錯誤得到解決 但我不能叫Demo.cs的任何方法從我的另一個Demo1.js

給出錯誤:
Assets/Scripts/Demo1.js(81,20): BCE0018: The name 'Demo' does not denote a valid type ('not found').

任何解決方案?

+0

我想的UILabel是NGUI框架的一部分從unityscript 得到解決NGUI組件。如果您使用的是NGUI,則應將其文件移至標準資產,或將Demo.cs移出標準資產。 – Calvin

+0

已解決 複製標準聲明中的所有NGUI文件,但我保留在文件夾中的一個文件夾「編輯器」除外 – Dasu

回答

0

您正在尋找的UILabel類可能是NGUI的一部分。

將NGUI從資產商店(假設您已購買)導入您當前的項目中,Unity將找到該類。