2d Platform demo - console error

Hi,
New Unity user here.
Just running the 2D platform demo tutorial and follow the pdf to the letter:
Select File>
Open Project and locate the 2D Tutorial project that you have downloaded.
Once you have opened the project, find the scene 2D Platformer in the Project
Pane and open it.
Play the Scene.

But I immediately get a bunch of console errors:

Assets/Scripts/2D/Camera/camerafocus.js(6,31): BCE0018: The name ‘CameraScrolling’ does not denote a valid type.
Assets/Scripts/2D/Camera/camerascrolling.js(10,31): BCE0018: The name ‘LevelAttributes’ does not denote a valid type.
Assets/Scripts/2D/character controls/platformerplayeranimation.js(47,26): BCE0018: The name ‘PlatformerController’ does not denote a valid type. Did you mean ‘System.PlatformID’ ?

etc

Any clues? This was a straight install and open project, nothing fancy.

ty!

Hi, sorry to hear you’re having issues right out of the gate. The scripts seems to have lost their case. So instead of “CameraScrolling” it has become “camerascrolling”. Unity is case sensitive so you need to change these scripts back to their original names. You can do this by changing the script names you see in the console until all the errors go away.

Wow, that’s very weird to happen.

Let me do some edits and see if it works.

ty for the quick reply.

I don’t understand what is going on here.

ex: Assets/Scripts/2D/Camera/camerafocus.js(6,31): BCE0018: The name ‘CameraScrolling’ does not denote a valid type.

If I look in the 2d assets script directory with explorer the file is correctly named CameraScrolling.js yet in the error console and uniscite it is coming up as camerascrolling.js

This is a clean install under win xp sp3

What does the file name read if you reveal it in the Explorer?

CameraScrolling.js in windows explorer.

But in Unity project window under scripts they are all lower case ie: camerascrolling

on a clean install…

Ok, weird. Try re-importing everything by selecting everything in the Project View, right-clicking and choose Reimport.

no effect.

When the import dialog is running it looks like all the names are lower cased.

Surely someone else has had this issue?
File names are upper and lower case but inside unity they seem to be converted all to lowercase, yet the actual script code is upper and lower case?

My brain hurts already…especially since I forked over us$199 already!

This is very strange.

Could you try to redownload the tutorial, unzip it to a different folder, and opening that folder with unity, to see if that also behaves the same?

Equally puzzled,

Lucas

okie dokie.

Did that. Even weirder is I still get the same errors, except this time the game actually plays instead of freezes. The only thing I did different was keep the same unzip folder structure as it unzipped.

It’s late here in Tokyo, going to bed. Will test some more projects tomorrow to see what is up.

Many thanks for your help. Any other ideas feel free to drop them in!

ty.

How much did you modify the folder structure and did you modify it within Unity or in the Explorer? Unity uses a lot of metadata to keep track of assets and if you start moving things around outside of the program, or if you do not include the Library folder with projects, then things can get screwy fast. When moving Projects around it is essential to keep the hierarchical structure intact.

none. Unzip, open in Unity.

I uninstalled it and reinstalled it to drive C default instead of Drive D where my apps are with the same result.

This is the Editor Log from running 2D platform tutorial. All I did was download the tutorial zip and unzip it in the Unity Projects folder. C:\Documents and Settings\Paul\My Documents\Unity\2D Platform Demo\2DGameplayTutorialProject

I get similar naming errors with the island demo and other test projects.
I’m not the only one who has this behavior → http://forum.unity3d.com/viewtopic.php?t=22510 (half way down)

This looks to have been bug reported multiple times and you don’t have a solution for such a showstopper bug? Surely this must have been identified and fixed?

Audio devices: Generic Hardware (default: Generic Hardware)
Initialize mono
Direct3D:
Version: Direct3D 9.0c [nv4_disp.dll 6.14.11.8122]
Renderer: NVIDIA GeForce 7900 GS
Vendor: NVIDIA
VRAM: 256 MB
LicenseInfo:InitializeProtection
open PACE from our own executable
opened PACE, get info…
checked authorization, authstate=100 r=0
ReadDeveloperData
ReadTokens
Successfully changed project path to: C:/Documents and Settings/Paul/My Documents/Unity Projects/2DGameplayTutorialProject/2D Gameplay Tutorial
C:/Documents and Settings/Paul/My Documents/Unity Projects/2DGameplayTutorialProject/2D Gameplay Tutorial
Mono: successfully reloaded assembly
Compile Dirtymask 11111111111100
Calculating changed assemblies
Couldn’t load the script “platformercontroller” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “Foot” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “platformerplayeranimation” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “collisionsoundeffect” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “stopemittingafterdelay” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “spaceship” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “meshcombineutility” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “levelattributes” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “collisionparticleeffect” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “platformtarget” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “movingplatformeffects” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “platformmover” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “spawnpoint” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “combinechildren” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “platformerpushbodies” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “deathtrigger” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “camerafocus” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “cameratargetattributes” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “specialeffecthandler” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “camerascrolling” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

Couldn’t load the script “twodhelper” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: …..\Runtime\Mono\MonoScript.cpp Line: 384)

+++ Ignoring UnityScript - Editor because it depends on CSharp - first pass
+++ Ignoring UnityScript because it depends on CSharp - first pass
End Calculating changed assemblies
Calculating changed assemblies
+++ Ignoring UnityScript - Editor because it depends on CSharp - first pass
+++ Ignoring UnityScript because it depends on CSharp - first pass
End Calculating changed assemblies

  • starting compile Library/ScriptAssemblies/Assembly - CSharp - first pass.dll
  • Finished compile Library/ScriptAssemblies/Assembly - CSharp - first pass.dll
    Calculating changed assemblies
    +++ Ignoring UnityScript - Editor because it depends on UnityScript
    End Calculating changed assemblies
  • starting compile Library/ScriptAssemblies/Assembly - UnityScript.dll
  • Finished compile Library/ScriptAssemblies/Assembly - UnityScript.dll
    Assets/Scripts/2D/Camera/camerafocus.js(6,31): BCE0018: The name ‘CameraScrolling’ does not denote a valid type. (Filename: Assets/Scripts/2D/Camera/camerafocus.js Line: 6)
    Assets/Scripts/2D/Camera/camerascrolling.js(10,31): BCE0018: The name ‘LevelAttributes’ does not denote a valid type. (Filename: Assets/Scripts/2D/Camera/camerascrolling.js Line: 10)
    Assets/Scripts/2D/character controls/platformerplayeranimation.js(47,26): BCE0018: The name ‘PlatformerController’ does not denote a valid type. Did you mean ‘System.PlatformID’ ? (Filename: Assets/Scripts/2D/character controls/platformerplayeranimation.js Line: 47)
    Assets/Scripts/2D/character controls/platformerpushbodies.js(11,26): BCE0018: The name ‘PlatformerController’ does not denote a valid type. Did you mean ‘System.PlatformID’ ? (Filename: Assets/Scripts/2D/character controls/platformerpushbodies.js Line: 11)
    Assets/Scripts/2D/levelattributes.js(9,31): BCE0018: The name ‘LevelAttributes’ does not denote a valid type. (Filename: Assets/Scripts/2D/levelattributes.js Line: 9)
    Assets/Scripts/2D/spaceship/spaceship.js(129,36): BCE0018: The name ‘CollisionSoundEffect’ does not denote a valid type. (Filename: Assets/Scripts/2D/spaceship/spaceship.js Line: 129)
    Assets/Scripts/Effects/Foot.js(5,39): BCE0018: The name ‘CollisionParticleEffect’ does not denote a valid type. Did you mean ‘System.Runtime.InteropServices.ComTypes.CALLCONV’ ? (Filename: Assets/Scripts/Effects/Foot.js Line: 5)
    Assets/Scripts/Effects/Foot.js(11,36): BCE0018: The name ‘CollisionSoundEffect’ does not denote a valid type. (Filename: Assets/Scripts/Effects/Foot.js Line: 11)
    Input: DirectInputDevice::SetProperty: unknown DInput error [0x2]

I suggest downloading the project freshly, removing the old one, and try working with it. It looks like some meta-data relating to the project structure has been corrupted.

Best wishes
Caitlyn

Done, and no, it’s not the problem imho.

ty.

Are you using a FAT 32 drive?

No

Okay, we’re nailing this down to a problem related to how the example files were zipped/compressed. Apparently when unpacking, something is broken under certain circumstances.

We’re going to get to the bottom of this one, so please hang in there.

fingers…slipping…

ok, spending some time thinking what may cause this.
Like any bug, very hard to nail unless you can reproduce and this is the problem with this one.

  1. Appears to have happened intermittently on both mac and pc
  2. Is it related to zip file compress/decompress and format (zip vs rar) and tool (7zip vs winrar vs winzip)? Don’t know, but I’ve had success and failure using all types, so hard to nail.
  3. Someone else pointed out it may be related to file names greater than 8, but have yet to confirm this.

?

Yes im having the same problem with all the scipts, All lowercase eg. ActivateTrigger in project manager becomes activatetrigger tried renaming but as soon as I press enter back to lowercase. But if I rename it to
Activate the capital A remains so it would seem that it is all script names 8 letter or more.