My project is hosed

Hopefully this is the right place (I can rarely figure it out) but…

I have a VRChat World Unity project that I’ve been working on for months. Even yesterday I made several edits and deployments. And then “wham” something happened an upon loading the project I am getting all sorts of library errors that prevent the build from even starting.

I “think” I updated a couple of VRChat libraries (their tool recommended it) but reinstalling the older ones didn’t fix anything. It could be (and looks like) a mismatch like some library is now looking for a routine that it can’t find.

I need advice on the smoothest, most-likely-to-succeed path to get the project working again. I have a copy under source control but simply cloning that didn’t seem to work. Can assets be migrated from my broken project to a new project reliably? Is that just copying the folder over?

Thanks.

Try deleting the Library folder first. It’s contents will be regenerated.

If that doesn’t help you should post error messages or the entire editor.log.

Thanks. I tried deleting the Library folder yesterday. It didn’t correct the issue. I did (on someone’s recommendation) unselect Player/Assembly Version Validation. This permits me to load the project without having immediate errors but errors returned upon trying to build.

Let me get a sense of the current errors. They were mostly internal to VRChat libraries which may not provide too many clues. One was related to Unity.Math but again I didn’t change these and everything was working once.

Oh, I’ve tried reimporting all and reimporting the ones reported. Didn’t help.

Library\PackageCache\com.unity.inputsystem@1.6.1\Tests\TestFixture\InputTestFixture.cs(94,29): error CS0117: ‘InputSystem’ does not contain a definition for ‘SaveAndReset’

Library\PackageCache\com.unity.inputsystem@1.6.1\Tests\TestFixture\InputTestFixture.cs(168,29): error CS0117: ‘InputSystem’ does not contain a definition for ‘Restore’

So I reverted the input system I was able to build for Windows and it worked! I was so hopeful. Decided to target Android (you need both in VRChat) and received other errors.

Assembly ‘Library/ScriptAssemblies/VRC.SDKBase.Editor.dll’ will not be loaded due to errors:
Reference has errors ‘WatsonTcp’.

Assembly ‘Library/ScriptAssemblies/VRC.SDK3.Editor.dll’ will not be loaded due to errors:
Reference has errors ‘VRC.SDKBase.Editor’.

Assembly ‘Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/CreatorCompanion/WatsonTcp.dll’ will not be loaded due to errors:
WatsonTcp references strong named Newtonsoft.Json Assembly references: 12.0.0.0 Found in project: 13.0.0.0.
Assembly Version Validation can be disabled in Player Settings “Assembly Version Validation”

Forgot to disable that on the Android side, trying that now.

You should be using source control. You mention deployments so I assume you are? If so, then if you updated the Packages/manifest.json file, that should be instantly obvious and revertable.

Otherwise, get the project under source control now before you wreck it trying to fix it. I don’t know how I could even sleep at night without having my projects safeguarded in git… It would be like this constant terror of complete disaster!!

PROPERLY CONFIGURING AND USING ENTERPRISE SOURCE CONTROL

I’m sorry you’ve had this issue. 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

I usually make a separate repository for each game, but I have some repositories with a bunch of smaller test games.

Here is 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 the ONLY folders you should ever source control are:

Assets/
ProjectSettings/
Packages/

NEVER source control Library/ or Temp/ or Logs/
NEVER source control anything from Visual Studio (.vs, .csproj, none of that noise)

Setting git up with Unity (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.

If you plan on joining the software industry, you will be required and expected to know how to use source control.

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

I seem to have resolved enough of the issues to get it build again. I have to guess that an upgrade to the VRC libraries introduced some version dependencies that weren’t being met. Disabling the validation seems to let things slide. I don’t love it but it works.

Thanks everyone

Kurt we’re not all stupid, thanks.

1 Like