Search Unity

The type or namespace name "xxx" could not be found (but it is exist!)

Discussion in 'Scripting' started by NewbiesFlippy, Jul 25, 2014.

  1. NewbiesFlippy

    NewbiesFlippy

    Joined:
    Jul 25, 2014
    Posts:
    4
    I am trying to make a day night cycle with tutorial and I follow his script but I got an error that I found so many resource still can't be solve,guys help me,it stuck me for few days,plz!:(

     
  2. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    Where is the type named "xxx" defined?
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    This error is saying that a type named "xxx" is not defined.

    Can you show the definition of the type "xxx"?

    (Edit: Disregard my post, LightStriker beat me to it. :) )
     
  4. NewbiesFlippy

    NewbiesFlippy

    Joined:
    Jul 25, 2014
    Posts:
    4

    Actually I don't know how to defined the array with a right way,but here is whole script and error.





    0442de0e3d85c4b39ca0f3c79d9d4566_w41_h19.gif
     
  5. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    Let's try something else... What IS "xxx"?
     
  6. NewbiesFlippy

    NewbiesFlippy

    Joined:
    Jul 25, 2014
    Posts:
    4
    XXX is Sun,origin name is Sun,but I test the error to change its name that I will better to see it influence.
     
  7. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    You wrote a class named "XXX" somewhere? Can you post that code?
     
  8. NewbiesFlippy

    NewbiesFlippy

    Joined:
    Jul 25, 2014
    Posts:
    4
    Oh ! thanks your notice,I fixed it problem by change the xxx name to the class name,and no error,sun working!

    Thank you guys , you are the best!

    093969763393613.jpg