A tool to dump or replace assets in a Unity asset bundle.
This program requires an uncompressed Unity asset bundle. Use Unity Assets Bundle Extractor Avalonia (UABEA) to decompress an asset bundle if it's compressed.
It also requires the name of the member
(the field of an object in the assets file, NOT the game object itself) you'd like interact with in the asset bundle (ex. m_Name
), except for when you are dealing with textures.
The best way to find members/fields for an object is to open the asset bundle in UABEA or a similar tool, then open the asset file and then the object, where you'll find a list of all members for that object.
To extract, you also need to set the path of where you'd like to dump to.
To replace assets, you need to specify the path where the assets to import are and the name of the new asset bundle you're exporting. The files inside of the directory must match the asset names exactly in order to be imported.
For a more in-depth tutorial, check out the guide.
-h
, -?
, --help
: show the help message and then exit.-b
, --bundle=BUNDLE
: the original asset bundle path you want to read from.-m
, --member=MEMBER
: the member to dump or replace.-t
, --texture
: will deal with textures instead of members. Uses PNG the format.-d
, --dump=DUMP
: the path of the directory you wish to dump the assets to.-i
, --input=INPUT
: the input directory of the assets you wish to overwrite with.-o
, --output=OUTPUT
: the path and name of the asset bundle you wish to write to when replacing.assetBundle.bun
with member m_Script
to extractedAssets/
:
UnityAssetReplacer -b assetBundle.bun -m m_Script -d extractedAssets
assetBundle.bun
with member m_Script
, reading from newAssets/
, to newAssetBundle.bun
:
UnityAssetReplacer -b assetBundle.bun -m m_Script -i newAssets -o newAssetBundle.bun
assetBundle.bun
to extractedTextures/
:
UnityAssetReplacer -b assetBundle.bun -t -d extractedTextures
assetBundle.bun
, reading from newTextures/
, to newAssetBundle.bun
:
UnityAssetReplacer -b assetBundle.bun -t -i newTextures -o newAssetBundle.bun
See the guide for how it is used in action.
dotnet
dotnet restore
or skip and let it run implicitly when running the next step.dotnet build
in the project root.Visual Studio
UnityAssetReplacer.sln
in Visual StudioBuild -> Build Solution
to build or the green arrow to build and run.