I have a Scene as a Unity "AssetBundle" to load, because this scene is well over 4GB in size and therefore no longer properly exported over the normal build.
The problem is, I always get an error message when loading the AssetBundle.
**Error message: "Assertion failed: Assertion failed on expression: 'm_UncompressedBlocksOffsets [blockInd] <= from + dstPos && m_UncompressedBlocksOffsets [blockInd] + uncompressedBlockSize> = from + dstPos"**
My script for loading AssetBundles:
IEnumerator SceneLoader()
{
var bundleRequest = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "gamescene"));
yield return bundleRequest;
if (bundleRequest == null)
{
Debug.LogError("AssetBundle could not be loaded!");
yield break;
}
SceneManager.LoadSceneAsync("GameScene");
}
↧