Unknown Compilation Error

I was making some minor changes in a script when the unity editor threw me a compilation error (code -1073741819) even though VS told me it was fine. The code looked fine so I restarted Unity and VS, entered safe mode, and the same error was there again. Being lost, I did the default thing and rebooted my PC. The compilation error warning has gone and everything works normally. I did have a minor heart attack when Unity opened up with an empty scene rather than the one I’d been working on for ages, and I feared it had been deleted

Not a very important bug, but I thought I’d report it anyway. I’m running Unity 2021.3.8f1 and VS 20221 17.3.1. I also have the Unity packages Visual Studio Code Editor 1.2.5 and Visual Studio Editor 2.0.16. All of these are up to date as of writing. The only slightly-non standard thing I did before I got the error was to rename a script with an MB in VS and have it automatically rename the first class through out. I’m guessing that might have been the root of it?

Since I’ve rebooted my PC already, I’m afraid I don’t have much more diagnostic info to provide…

Beware that POSTING ON THE FORUM DOES NOT CONSTITUTE REPORTING A BUG!

Posting on the forum is the same as standing at the edge of the ocean and screaming at the water.

Posting on the forum will have zero impact on the Unity developers.

Instead, file a bug properly. There is ONE WAY to file a bug:

---------> Within Unity, use Help → Report A Bug

Oh my goodness, don’t work like THAT! This is August 2022 after all! We have evolved to much higher planes!

Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

As far as configuring Unity to play nice with git, keep this in mind:

https://discussions.unity.com/t/736093/3

Here’s how I use git in one of my games, Jetpack Kurt:

https://discussions.unity.com/t/807568/3

Using fine-grained source control as you work to refine your engineering:

https://discussions.unity.com/t/826718/2

Share/Sharing source code between projects:

https://discussions.unity.com/t/719810/2

Setting up an appropriate .gitignore file for Unity3D:

https://discussions.unity.com/t/834885/5

Generally setting Unity up (includes above .gitignore concepts):

https://thoughtbot.com/blog/how-to-git-with-unity

It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It’s simply ridiculous not to back up.

“Use source control or you will be really sad sooner or later.” - StarManta on the Unity3D forum boards

Why is “Bug” even an optional thread prefix on the forum then?

As for source control, I have it with my code itself, I just hadn’t expanded it to cover the unity side of things. This is just a side project for fun and started very casually, so I didn’t set it up as thoroughly as I would for something professional. Trust me, I had rectified my mistake before posting about it on here.