Skip to main content
Typos
Source Link
DMGregory
  • 141k
  • 23
  • 258
  • 401

No, you cannot unpack a Unity build into the source files for the project.

You can decompile the managed assemblies to get equivalent C# code out of them, but it won't be exactly the code you wrote. It will likely be mangled and harder to read, lacking comments etc.

You can try to extract assets like textures too, but you won't get your original files back. In order to make them fast to load and efficient to display on graphics hardware, Unity converts files to GPU friendly formats and applies various compression strategies to them as part odof the build process. This can be lossy — the texture you get at the end is not necessarily a pixel-for-pixel match with the input image.

If you have one specific script you don't remember how to write, or one specific image asset you can't re-make, then these strategies might be worthwhile to get a starting point you can then edit by hand back to what you want it to be.

But for most purposes, you'll be better off remaking the project from scratch, using what you learned the first time around to do it better this time.

One such lesson should be to use a version control system and keep a backup somewhere so you never land in this situation again.

No, you cannot unpack a Unity build into the source files for the project.

You can decompile the managed assemblies to get equivalent C# code out of them, but it won't be exactly the code you wrote. It will likely be mangled and harder to read, lacking comments etc.

You can try to extract assets like textures too, but you won't get your original files back. In order to make them fast to load and efficient to display on graphics hardware, Unity converts files to GPU friendly formats and applies various compression strategies to them as part od the build process. This can be lossy — the texture you get at the end is not necessarily a pixel-for-pixel match with the input image.

If you have one specific script you don't remember how to write, or one specific image asset you can't re-make, then these strategies might be worthwhile to get a starting point you can then edit by hand back to what you want it to be.

But for most purposes you'll be better off remaking the project from scratch, using what you learned the first time around to do it better this time.

One such lesson should be to use a version control system and keep a backup somewhere so you never land in this situation again.

No, you cannot unpack a Unity build into the source files for the project.

You can decompile the managed assemblies to get equivalent C# code out of them, but it won't be exactly the code you wrote. It will likely be mangled and harder to read, lacking comments etc.

You can try to extract assets like textures too, but you won't get your original files back. In order to make them fast to load and efficient to display on graphics hardware, Unity converts files to GPU friendly formats and applies various compression strategies to them as part of the build process. This can be lossy — the texture you get at the end is not necessarily a pixel-for-pixel match with the input image.

If you have one specific script you don't remember how to write, or one specific image asset you can't re-make, then these strategies might be worthwhile to get a starting point you can then edit by hand back to what you want it to be.

But for most purposes, you'll be better off remaking the project from scratch, using what you learned the first time around to do it better this time.

One such lesson should be to use a version control system and keep a backup somewhere so you never land in this situation again.

Source Link
DMGregory
  • 141k
  • 23
  • 258
  • 401

No, you cannot unpack a Unity build into the source files for the project.

You can decompile the managed assemblies to get equivalent C# code out of them, but it won't be exactly the code you wrote. It will likely be mangled and harder to read, lacking comments etc.

You can try to extract assets like textures too, but you won't get your original files back. In order to make them fast to load and efficient to display on graphics hardware, Unity converts files to GPU friendly formats and applies various compression strategies to them as part od the build process. This can be lossy — the texture you get at the end is not necessarily a pixel-for-pixel match with the input image.

If you have one specific script you don't remember how to write, or one specific image asset you can't re-make, then these strategies might be worthwhile to get a starting point you can then edit by hand back to what you want it to be.

But for most purposes you'll be better off remaking the project from scratch, using what you learned the first time around to do it better this time.

One such lesson should be to use a version control system and keep a backup somewhere so you never land in this situation again.