Author Topic: `UILabel' could not be found  (Read 3397 times)

Das

  • Guest
`UILabel' could not be found
« on: October 16, 2013, 10:56:54 PM »
When I Place Demo.cs in Standard Assets Folder I am Getting this error

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?


and when I place Demo.cs Assets Folder above error get solved
but i cant call any method of Demo.cs from my another Demo1.js
Gives error

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

any solution ?
« Last Edit: October 16, 2013, 11:07:18 PM by Das »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: `UILabel' could not be found
« Reply #1 on: October 18, 2013, 06:47:36 PM »
The way Unity works is this:

Standard Assets are processed first. Everything outside of Standard Assets will not be available to scripts inside. The FAQ explains what to do with NGUI to get it to run with Javascript -- which is also always compiled before C#.

Bottom line: read the FAQ, and don't mix C# with JS.

Das

  • Guest
Re: `UILabel' could not be found
« Reply #2 on: October 19, 2013, 12:09:17 AM »
Thanks for reply and I gone through FAQ solved many problems.