What just happened to my Unity!?

Hi guys,
I was just plugging away at my project. Everything working great. I saved my player input script to test it out. All of a sudden, major errors that I’ve never seen before. I hit play to go to runtime, no keyboard input is recognized. I still have control over my in-game camera because it is mouse controlled.

I tried rebuilding my character’s prefab, nothing. Deleting and re-adding movement scripts. nothing. reload the scene, nothing. reload the project, nothing. Build & Run, nothing. load AngryBots demo, nothing! reboot my computer and repeat everything I’ve tried in this paragraph thus far, nothing. reinstall Unity!! nothing!!

I wasn’t able to get the original error that popped up when I first had problems, but I have 2 screen shots of the errors I see when loading AngryBots demo and my project.

This is what I see when I load my project.
[4730-wtf+unity.png|4730]

This is what I see when I load AngryBots Demo.
[4731-wtf+unity+2.png|4731]

Any help, much appreciated!!

Looks like your asset database is corrupted.

Try this:

  1. Enable .meta files (see Using External Version Control Systems with Unity).
  2. Close Unity.
  3. Remove everything that is inside the Library/ folder to clear the cache, preview, assetdatabase, etc.
  4. Start Unity and open your project.
  5. The asset database should be rebuilt (this will take some time, depending on the size of your project).

You may loose most of the connections between assets and prefabs if the .meta files are not properly created (due to your issue). Or you could be lucky.

These are console errors and they’re telling you that some of your code is broken. Were you messing about with the example game?

Check your scripts.

Unity gets confused when there is a folder named Assets in your project, you will need to rename it:

Close the project, then click on Open Project, click the find button, and click on your project folder. We open the project this way to avoid asset confusing.
Then FROM WITHIN UNITY, rename the assets folder that is inside your project panel to GameAssets. (do not do it from “My Computer (windows)”/the Finder (mac), as this may lead to the wrong folder being renamed further ruining your project)

Let me know how this goes :slight_smile:

To explain it, all projects are in a folder. This folder contains four folders:

Assets, Library, ProjectSettings, and Temp.

When you open a Unity project, and go to the Project panel (there is a panel in Unity named Project), that panel will display the conetns of the Assets folder. If you have a folder NAMED Assets WITHIN the original Unity Assets folder… Then Unity gets the two mixed up, and bad things happen. The solution is to make sure that none of your folders are named Assets