- Home /
Unity Error: “Class defined in script does not match file name” happens after pushing to version control
Sometimes when I push my Unity scripts, scenes, proj, etc.. to version control main repository and I open my project again, I get this error "The class defined in script file name 'file' does not match the file name!" even though it does and has been working previously. Sometimes this goes away when I close and open the project again or reset my computer. But this an absurd solution to getting this fixed.
Why does this keep happening and how do I prevent it in the future?
I am using Kiln for version control and C# for language.
do you have every class in its own file? Even enums that are not defined within another class?
Answer by gfallasc · Jan 24, 2014 at 07:09 PM
Did you set up your project for generating .meta files? Unity requires it! See this http://docs.unity3d.com/Documentation/Manual/ExternalVersionControlSystemSupport.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613131327im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Unity crashes when opening copied project folder 3 Answers
Class enemy in javascript help 1 Answer
multiple groups developing a single iPad game in Unity 4 Answers