Unity 2018.4 - Trying to reload asset from disk that is not stored on disk
I have a few folders marked for asset bundles like so:
And when I build them via a script, I get the following messages. Oddly enough, once per asset I'm putting in the bundles.
The error points to the "BuildAssetBundle" section of a script I'm preparing the bundles with that looks like this:
string assetBundleDirectory = "Assets/AssetBundles";
if (!Directory.Exists(assetBundleDirectory))
{
Directory.CreateDirectory(assetBundleDirectory);
}
BuildPipeline.BuildAssetBundles(assetBundleDirectory,
BuildAssetBundleOptions.ForceRebuildAssetBundle,
BuildTarget.StandaloneWindows);
I'd like to note that my folder structure is "Assets/_Assets/etc" so I can keep all game data in its own folder tree. The bundles are being created to "Assets/AssetBundles".
Does anyone have a clue why this might be happening? The bundles are being generated just fine and they work perfectly during runtime.
Answer by MamaCatDev · Jun 03, 2019 at 02:23 AM
Alright, so I figured out the problem, I guess?
Or at least I figured out how to stop these errors. I still have no idea why the error exists.
The assets were in their own folders inside the path: "Assets/_Assets/AssetBundles/Bundle1, Bundle2, etc" Once I renamed the folder to _Bundles, so it looked like "Asset/_Assets/_Bundles/Bundle1" the errors disappeared completely.
I'm not sure if there's something going on inside the BuildAssetBundle function that deals with a vague "AssetBundles" folder reference or not, but hey, I just won't do that anymore and it seems everything is fine. Go figure?
Note: This path has 'nothing' to do with the folder I'm building the bundles TO a.k.a "Assets/AssetBundles"
Your answer
Follow this Question
Related Questions
use AssetBundle.LoadAssetAsync in editor is about 10 times slower on windows than on ios devices 1 Answer
Error loading assetbundles on ios in background,Error loading assetbundles on ios in background 0 Answers
Problem with Asset Bundles in Unity 2020.3.30f1 1 Answer
Why does the AssetBundle needs the assets to be present in the folder? 0 Answers
Addressables build failing due to Lua scripts and then for an unknown reason 0 Answers