Errors on importing Standard Assets

Hi,

I am a newbie Unity user and i am stuck with a problem i can’t solve.
I’m trying to get to know different features and follow different tutorials about unity but when i import an asset package from unity store (Standard Assets for exaple) i keep getting a bunch of errors on the console. I don’t do anything in my project that cause build errors and i don’t even know where to search for the solution.
When i start the project i don’t use any packages to include creating it.
The path for the imported asset package is: %myDocuments/%projectName/Assets

As i’m trying to create a 2D platformer i only select 2D folder and all of its subfolders from the package to import.

The errors are the following:
Broken YAML file(Assets/Standard Assets/2D/Animator/2dCharacterAnimator.controller). Local file identifier (110283043) doesn’t exist!
Broken YAML file(Assets/Standard Assets/2D/Animator/2dCharacterAnimator.controller). Local file identifier (110232664) doesn’t exist!
Assets/Standard Assets/2D/Scripts/Platformer2DUserControl.cs(3,27): error CS0234: The type or namespace name CrossPlatformInput' does not exist in the namespace UnityStandardAssets’. Are you missing an assembly reference?

Thanks for your help on advance.

1 Like

Welcome to Unity,
The two problems are ominously red but easy to fix.

I’ve reported the Broken YAML error to Unity (Case 741247) and it will likely be fixed soon but, all you need to do is get out of Unity and go back in. When you reload your 2D project, you won’t see the YAML errors because Unity will ‘rediscover’ the files and all should be well with YAML.

The namespace error means that the files in the 2D folder that you imported ALSO needs you to import the CrossPlatform folder that you excluded. Just reimport the 2D standard asset into your project. To avoid problems, it’s ‘usually’ best to just import the entire package when you import an asset… unless you know what will and won’t be called or needed. When I import several assets, I jump out of Unity and back into my project. It makes Unity do a quick refresh. Just my hacky paranoid habit.

If you haven’t seen them yet, checkout the Unity Learn for 2D tutorials Unity - 2D Roguelike tutorial at Unity - Learn
They’re a big help getting started with Unity.
Good luck!

Thank you for your informative reply.
I’ve also tried to import the whole asset package several times but still had some errors after it.
But if the solution to fix these issues is only some open/close tricks then i’ll make sure i try doing it the same way you explained.

Thank you for your tutorial advice, i will check it out.