The name 'Transform' does not denote a valid type ('not found'). Did you mean 'System.Net.Mime.TransferEncoding'? (BCE0018)

Hi all,
I am new to game development, I am learning unity from
and when i came to scripting part it started giving me errors
error image

D:\My Unity
Error BCE0021: Namespace ‘UnityEditor’
not found, maybe you forgot to add an
assembly reference? (BCE0021)
(Assembly-UnityScript-firstpass) D:\My
Error BCE0005: Unknown identifier:
‘Transform’. (BCE0005) (Respawn)

I never touched CharacterMotor.js but i started giving errors, and in my script respawn the I am not able to use Transform.
Please help me.

edit(copied from comment)

It's a simple script:

function Update ()
    if (Transform.Position.y < -10)
    if (Transform.Position.y < -20)
        Transform.Position.x = 0;
        Transform.Position.y = 2; 
        Transform.Position.z = 0; 

You need to put any scripts which use the UnityEditor namespace inside a subfolder called ‘Editor’. This tells Unity that those scripts are edtior-only and not to include them in the build! It also lets the compiler know that the editor namespace exists.

The 'UnityEditor' namespace error may be a bug of Unity 3.4.1f5. Many people have reported it (See unity 3.4.1f5 namespace error - Unity Answers).

Despite the errors being given in MonoDevelop, Unity can compile the scripts successfully. So, just ignore them :slight_smile:

The Transform error seems to be caused because there's something wrong with your script 'Respawn.js', but I'm not sure about it.

Transform is a type! You can't use a type like a variable. To access the Transform component of your GameObject you have to use `transform` (notice the lower-case "t" ) instead of `Transform`.

Also the `.position` property have to be lower-case.