Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

328
Vistas
Unity cannot recognize some .cs files after pulling a project from git

I am currently developing a project using Unity 2020.3.3f1. I use git version control system and store my project in a Bitbucket repository. When I clone / pull my project to another computer (especially with macos) some of my cs. files are displayed as an unknown file` (not a script) in the project view, and some other classes cannot find the class defined on that file. When I right click and select "reimport" the cs file, recovered immediately and I build successfully.

This causes me a problem when I try to build my project through Unity Cloud build, because I get an error about some missing classes which are indeed there.

[Unity] Initialize engine version: 2020.3.6f1 (338bb68529b2)
3: [Unity] -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/ToonyColorsPro.Editor.dll
4: [Unity] Assets/JMO Assets/Toony Colors Pro/Editor/Shader Generator/Config.cs(192,13): error CS0246: The type or namespace name 'MaterialLayer' could not be found (are you missing a using directive or an assembly reference?)
5: [Unity] Assets/JMO Assets/Toony Colors Pro/Editor/Shader Generator/ShaderProperty.cs(417,40): error CS0246: The type or namespace name 'MaterialLayer' could not be found (are you missing a using directive or an assembly reference?)
6: [Unity] Assets/JMO Assets/Toony Colors Pro/Editor/Shader Generator/Config.cs(173,59): error CS0246: The type or namespace name 'MaterialLayer' could not be found (are you missing a using directive or an assembly reference?)
7: [Unity] Assets/JMO Assets/Toony Colors Pro/Editor/Shader Generator/Config.cs(192,13): error CS0246: The type or namespace name 'MaterialLayer' could not be found (are you missing a using directive or an assembly reference?)
8: [Unity] Assets/JMO Assets/Toony Colors Pro/Editor/Shader Generator/ShaderProperty.cs(417,40): error CS0246: The type or namespace name 'MaterialLayer' could not be found (are you missing a using directive or an assembly reference?)
9: [Unity] Assets/JMO Assets/Toony Colors Pro/Editor/Shader Generator/Config.cs(173,59): error CS0246: The type or namespace name 'MaterialLayer' could not be found (are you missing a using directive or an assembly reference?)
10: ! build of 'default-ios-ad-hoc' failed. exit
11: publishing finished successfully.
12: Finished: FAILURE

After that I tried pulling the project from a Mac device, the project also could not recognize the same MaterialLayer.cs. I easily recovered using "reimport". My project settings / Asset Serialization : Force Text and "Version Control / Visible Meta Files" are already set.

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

It's a long shot and I write answer only because I can attach image here:

Every file in C# solution has properties:

enter image description here

So my suggestion is to double check if those "missing", "unknown" .cs files have same properties set as those .cs files, which are recoginzed correctly.

over 4 years ago · Santiago Trujillo Denunciar

0

If you using LFS on git then this issue sometimes happens when LFS pulled with a bug or metafiles was broken during pulling files, please double check your .gitattributes. It's possible that the merge option for .meta was wrongly assigned. I'm using this .gitattributes for my projects, still no issues with this.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda