- Home /
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.
This is what I see when I load AngryBots Demo.
Any help, much appreciated!!
Did you system clock change? Did you rename your project? Do you have a folder named "Assets" in your project panel? It's late here, so sorry if these questions are useless
Did you system clock change? nope Did you rename your project? nope Do you have a folder named "Assets" in your project panel? yup
Answer by Kryptos · Nov 06, 2012 at 10:35 AM
Looks like your asset database is corrupted.
Try this:
Enable .meta files (see Using External Version Control Systems with Unity).
Close Unity.
Remove everything that is inside the Library/ folder to clear the cache, preview, assetdatabase, etc.
Start Unity and open your project.
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.
Thanks for the suggestion, this did not seem to have an affect though :-/
Answer by Althaen · Nov 06, 2012 at 12:54 PM
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.
I did not mess with AngryBots at all, I just loaded it completely stock and it had all those compiler errors. I can't run it because of them.
Answer by Flynn · Nov 11, 2012 at 09:08 PM
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 :)
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
Your answer
Follow this Question
Related Questions
Checking whether string is a valid Input.Key 1 Answer
A node in a childnode? 1 Answer
how to get Inputs from touch keyboard... 2 Answers
How to distinguish between multiple keyboards? 1 Answer
How can i make button on iOS instead key 0 Answers