Need help with built-in text script

Hello there, thanks for reading this!

I recently lost my project files (SSD got corrupted) but I have many builds lying around so I got this tool for extracting the project files from the build. It worked better than planned and recovered practically the entire Unity project. The asset files weren’t in order, but that’s hardly anything to complain about.
Anyway, getting to the point, once I opened the project for the first time I had to re-install Unity UI for some reason. After that there was a duplicate .dll I had to delete (something related to TextMeshPro, I think). Then, I found this error:

Unity.SourceGenerators\Unity.MonoScriptGenerator.MonoScriptInfoGenerator\AssemblyMonoScriptTypes.generated.cs(5,20): error CS0101: The namespace ‘’ already contains a definition for ‘UnitySourceGeneratedAssemblyMonoScriptTypes_v1’

with a whole bunch of other errors that said pretty much the same thing.
I deleted the offending script (UnitySourceGeneratedAssemblyMonoScriptTypes_v1.cs), but then all my text objects in the scene went blank and said “The associated script cannot be loaded. Please fix any compile errors and assign a valid script.”
The funny thing is that if I delete that text script then there are no errors, but if I keep it then there are.

If anybody could provide an answer to what I should do it would be great.
I’m happy to provide more details if needed.

Thanks!

Never had to do this before, but It sounds like it imported a bunch of duplicate Unity files with the files you scraped. Recommend you grab all your code files by hand and port them into a fresh project, along with all your art assets. Or, if you think you can, search up the dupe files in your project to delete. Either one may take a while.

Thanks for your reply, I think I might just copy everything (including scenes) to a new project

Hope it helps. Just be careful you don’t port over the problem too

I… ported over the problem too.

But it doesn’t matter, I just deleted all text objects and re-created them from looking at them in the build.
It’s taking some time, but it’s worth it.

Thanks for your answer anyway!

Whoops! It happens, but I’m glad you’re making progress lol

Could be a good excuse to organise everything. :slight_smile:

bit of a tangent, but I encourage you to always push to github (or whatever git vendor you like). I have never lost code in my whole career, and I coded (and still code) a lot, and I’m not even following best practices often enough (commit small and often)