Skip to content

Commit

Permalink
Create Directory for Dumping
Browse files Browse the repository at this point in the history
Create the directory if it does not already exist when dumping.
  • Loading branch information
Skyluker4 committed Jun 26, 2021
1 parent 28dc1b4 commit 118fcc5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ To replace/import assets, you need to specify the path where the assets to impor

#### Dumping

- ```-d```, ```--dump=DUMP```: the path of the directory you wish to dump the assets to. **This directory must already exist.**
- ```-d```, ```--dump=DUMP```: the path of the directory you wish to dump the assets to.

#### Replacing

Expand Down
4 changes: 2 additions & 2 deletions UnityAssetReplacer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.1.1.0")]
[assembly: AssemblyFileVersion("2.1.1.0")]
[assembly: NeutralResourcesLanguage("en-US")]
3 changes: 3 additions & 0 deletions UnityAssetReplacer/UnityAssetReplacer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public void ReplaceAssets(string inputDirectory, string outputAssetBundlePath) {

// Method to dump bytes to a specified path from assets in an asset file with a given member name
public void DumpAssets(string dumpPath) {
// Create output folder
Directory.CreateDirectory(dumpPath);

// Loop through every asset in asset file
foreach (var inf in _assetsTable.assetFileInfo) {
// Get specific asset
Expand Down
2 changes: 1 addition & 1 deletion UnityAssetReplacer/UnityAssetReplacer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<PackageId>UnityAssetReplacer</PackageId>
<Authors>Luke Simmons</Authors>
<PackageTags>C#, Unity, Asset Bundle, Asset Bundles, Asset Bundling, Reverse Engineering, Extract, Extractor, Extraction, Extract Data, .NET, .NET Core, .NET 5</PackageTags>
<PackageReleaseNotes>- Add support for interacting with binary files</PackageReleaseNotes>
<PackageReleaseNotes>- Creates an output directory for dumping if it does not exist yet</PackageReleaseNotes>
<RootNamespace>UnityAssetReplacer</RootNamespace>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseFile>../LICENSE</PackageLicenseFile>
Expand Down

0 comments on commit 118fcc5

Please sign in to comment.