Skyluker4 / UnityAssetReplacer

A tool to replace data in a Unity Asset Bundle from modified files.
GNU General Public License v3.0
38 stars 7 forks source link

[BUG] Program crashes when attempting to import moddified assets back into the bundle file #35

Open FaustoOrieta opened 3 hours ago

FaustoOrieta commented 3 hours ago

Description

A null reference exception error causing the process of importing modified assets back into a bundle to crash and abort.

Steps to Reproduce

  1. _Run 'UnityAssetReplacer' with options '-t -b "/path/to/decompressed/bundle" -i "/path/to/folder/of/moddified/assets/" -o "/path/to/output/new/bundle/file" '
  2. See the error.

Expected Behavior

I expect to have a new .bundle file with my moddified assets in it.

Output

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at AssetsTools.NET.Extra.BundleFileInstance..ctor(FileStream stream, String root, Boolean unpackIfPacked) at AssetsTools.NET.Extra.AssetsManager.LoadBundleFile(FileStream stream, Boolean unpackIfPacked) at AssetsTools.NET.Extra.AssetsManager.LoadBundleFile(String path, Boolean unpackIfPacked) at UnityAssetReplacer.Asset..ctor(String& inputAssetBundlePath) at UnityAssetReplacer.TextureAsset..ctor(String& inputAssetBundlePath) at UnityAssetReplacer.Program.Main(String[] args) Aborted (core dumped)

Platform

Extra information

I know having the modified assets being in the exact same order as in the original file is a requirement, and I have made sure that they're in fact in the same order.