Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity metafiles errors

I know the title may sound imprecise but that is because i'm not sure where my error comes from...

First, here's my folder organization :

  • Assets
    • Scenes
    • Scripts
      • MemoryCard.cs
      • SceneController.cs
    • Sprites

At start, the file "MemoryCard" was titled as "MemoryCards" (notice the "s" at the end). I use to edit my files with Unity's build-in text editor "Monodevelop" and while editing my file, I decided to rename it via Monodevelop... which appeared to be a bad idea since there now is a warning message :

"A meta data file (.meta) exists but its asset 'Assets/Scripts/MemoryCards.cs' can't be found. When moving or deleting files outside of Unity, please ensure that the corresponding .meta file is moved or deleted along with it."

I first deleted the .cs file and created a new one but the error remains...

My problem is I don't know which meta file I should look for since the meta file "MemoryCards.cs.meta" has been deleted and replaced at the creation of the new script by its corresponding .meta file...

I guess there's some kind of specific file referencing all the meta files like a tree or so... but I did not find any doc on the internet.

I hope any of you will be able to help me :)

Thank you in advance,

Axel

like image 474
Axel Samyn Avatar asked Oct 29 '22 12:10

Axel Samyn


1 Answers

Renaming the file in Monodevelop caused an error with the meta file.

My problem was solved by deleting the meta and the script file and then creating a new script file.

BUT, unless you make the right links/references to the new file and make the game runnable, Unity will warn you that there remains an error... but there's not.

So, if you're like me "a person who can't go on until all errors are solved" ... Well, just ignore it and build your project, the error will vanish.

like image 175
Axel Samyn Avatar answered Dec 13 '22 20:12

Axel Samyn