Logo Platform
logo amplifiers simplified
Humankind
Universe banner wording

Invalid data building asset bundle / Directory not found

Reply
Copied to clipboard!
2 years ago
Aug 3, 2022, 9:15:20 PM

I have put together a few mods previously without issue, but I put together a simple infrastructure mod and when I try to build it I get an error saying: "Invalid data when building asset bundle".


The full error in the console says this:


DirectoryNotFoundException: Could not find a part of the path "C:\Users\Owner\Documents\Humankind\Community\Baka's Infrastructure Balancing\Assets\AssetBundles\StandaloneWindows64\Baka's Infrastructure Balancing.a2927df8aa9c48b5a35313d3e3c83358.0.1\baka's infrastructure balancing.a2927df8aa9c48b5a35313d3e3c83358.0.1.assetbundle.txt"

System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <feaaa6313e32495d9f259b175aa6b597>:0)

System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) (at <feaaa6313e32495d9f259b175aa6b597>:0)

(wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)

System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 

bufferSize) (at <feaaa6313e32495d9f259b175aa6b597>:0)

System.IO.StreamWriter..ctor (System.String path) (at <feaaa6313e32495d9f259b175aa6b597>:0)

(wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string)

System.IO.File.WriteAllText (System.String path, System.String contents) (at <feaaa6313e32495d9f259b175aa6b597>:0)

Amplitude.Framework.Editor.Builds.AssetBundleBuildSettings.WriteRevisionFiles (UnityEditor.BuildTarget buildTarget, System.String outputDirectoryPath, System.Boolean isPatch) (at <b6bdfd22e4244b26acb5bc47877e9a2e>:0)

Amplitude.Framework.Editor.Builds.AssetBundleBuildSettings.Build (UnityEditor.BuildTarget buildTarget, System.Boolean patchAssetBundle, System.Boolean dryRun, System.Collections.Generic.List`1[Amplitude.Framework.Editor.Builds.AssetBundleBuildSettings+AssetEntry]& assets) (at <b6bdfd22e4244b26acb5bc47877e9a2e>:0)

Amplitude.Framework.Editor.Builds.AssetBundleBuildSettings.BuildFull (Amplitude.Framework.Editor.Builds.AssetBundleBuildOptions buildOptions) (at <b6bdfd22e4244b26acb5bc47877e9a2e>:0)

Amplitude.Framework.Editor.Builds.AssetBundleBuildSettings.BuildFull (Amplitude.Framework.Editor.Builds.AssetBundleBuildOptions buildOptions) (at <b6bdfd22e4244b26acb5bc47877e9a2e>:0)

Amplitude.Mercury.Production.Modification.ModuleEditor.TryBuildDatabasePlugin (Amplitude.Framework.Runtime.RuntimeModule runtimeModule, UnityEditor.BuildTarget buildTarget, System.String& outputMessage) (at <121ede6be1f64ec59ec907de00d81a41>:0)

UnityEngine.Debug:LogException(Exception)

Amplitude.Mercury.Production.Modification.ModuleEditor:TryBuildDatabasePlugin(RuntimeModule, BuildTarget, String&)

Amplitude.Mercury.Production.Modification.ModuleEditor:TryBuildModification(RuntimeModule, BuildTarget, String&)

Amplitude.Mercury.Production.Modification.ModuleEditor:BuildModification(RuntimeModule, BuildTarget, Boolean)

Amplitude.Mercury.Production.Modification.<>c__DisplayClass106_0:<BuildModification>b__1()

UnityEditor.EditorApplication:Internal_CallDelayFunctions()


Has anyone come across this error and know how to get around it?


Thanks

0Send private message
0Send private message
2 years ago
Aug 12, 2022, 12:32:21 AM

If you can get your mod tool kit to this screen you should be able to reimport the files successfully, after you Update the Bundle.
Follow the instructions in the 'alert' and use the drop down menu for \/ Amplitude Assets -> Asset Bundles -> Configuration and then for Asset Bundle Manifest select the projects file.

Updated 2 years ago.
0Send private message
0Send private message
2 years ago
Aug 23, 2022, 9:22:48 PM

I dont know much about nothing, but i can suggeat you change the path of the project (cut it feom you mod proj folder and place it in something like G:/modshknd/ to shorten the path. After that open the peoject from unity hub at the new path and see if it works. I got thos error because of the very long path the mod creates when built, extending over the 254 character limit on unity.

0Send private message
8 months ago
Sep 25, 2023, 11:16:56 AM

Here are some steps you can take to troubleshoot and potentially resolve this issue:

  1. Check File Paths and Names:

    • Ensure that all file paths and asset names in your mod project are correctly spelled and match the actual file names and paths in your project directory.
    • Pay attention to capitalization, as file systems in Windows are case-insensitive, while some other platforms are case-sensitive.
  2. Verify AssetBundle Configuration:

    • Double-check the configuration settings for your AssetBundles in Unity. Make sure that the AssetBundles are set up correctly with the appropriate names and dependencies.
    • Ensure that all assets referenced by the AssetBundle are present in the project and correctly linked.
  3. Check Mod Build Process:

    • Review the b2b data building process for your mod. Ensure that any scripts or tools you use to build the mod are correctly configured and generate the expected output.
    • Check if there are any custom build scripts or build-related code that might be causing issues.
Updated 8 months ago.
0Send private message
?

Click here to login

Reply
Comment
0Send private message