How to extract the Unity project - TheModderWasReplaced/AgriCore GitHub Wiki

If you want to add custom features like models, SFXs and UIs, it's useful to be able to simply modify the game like it was your project.

In this page, I will go over how to achieve such thing.

(This is more of a starting point, not a complete answer)

How to Obtain the game

Of course, you need the game itself in order to extract the project. You can simply buy the game on Steam or obtain it through other ways. I'm not encouraging piracy. All you need to know is that you need the executable.

How to Extract the Project

Here are every step needed to get the Unity project from the executable:

  1. Download the Unity 2021.3.45f1

The game's version could change in the future. An easy way to check the Unity version is to launch BepInEx. It should be written in the first few lines.

  1. Download AssetRipper
  2. Launch the program

If you have all the needed dependencies, a web page should open up.

  1. Click File > Open Folder
  2. Select the *_Data folder
  3. Click Export > Export All Files
  4. Click Select Folder and select an empty folder
  5. Click Export Unity Project

This created two folders: AuxiliaryFiles and ExportedProject.

  1. With Unity, open the folder ExportedProject
  2. Open the new project

Just a head's up: this can take a while. Normally, only the first time should take as long (due to downloading missing libraries and stuff).

  1. Enjoy the project

Now that you have the Unity project, you can start using the game's assets or build your owns.

Fixing the Project

When opening the project for the first time, you might came across errors with the project. Decompiling does not tend to make the most functional projects. However, it is possible to fix the project in order to make it work. In this section, we will go over each possible error and how to fix it.

Make sure to fix errors before fixing warnings

Broken DLLs

If an issue like Unloading broken assembly 'AnyDLLFile', this assembly can cause crashes in the runtime comes up, here is how you fix it:

  1. Select the broken DLL
  2. In the Inspector, change the OS in the Editor Settings to Windows
  3. Click Apply

Black Scene

If you can't see anything in the Scene window, make sure the following files have their OS set to Windows:

  • Unity.RenderPipelines.Universal.Runtime.dll
  • Unity.RenderPipelines.Core.Runtime.dll

Missing Behaviors

If an issue like The referenced script (ClassName) on this Behaviour is missing! came up, here is how you fix it:

  1. Go to Windows then Package Manager
  2. Select Unity Registry
  3. Install Unity UI and TextMeshPro
  4. Go to Windows, TextMeshPro then Import TMP Examples and Extras
  5. Click Import
  6. Go to Assets/Plugins
  7. Select Core.dll
  8. In the Inspector, change the OS to Any OS
  9. Click Apply
  10. Repeat steps 2 to 4 with Utils.dll and Unity.TextMeshPro.dll
  11. Go to Windows then Package Manager
  12. Remove TextMeshPro

cat: