Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Asset bundles, loading from local directory problem

Discussion in 'Editor & General Support' started by Nirvan, Jan 24, 2017.

  1. Nirvan

    Nirvan

    Joined:
    Nov 16, 2013
    Posts:
    134
    I I just want to instantiate example assetbundle asset, working on game for windows without needs for internet connection.
    I edited few scripts in AssetBundleManager to get it more for my likely.
    I trying to load asset bundle and by logs I see I made it work, but courutine for initialize never ends, last thing it return is AssetBundleLoadManifestOperation in line 216 in AssetBundleManager.cs

    I submitted my problem as bug but I don't get reply from unity so I asking here.
    I include this small project.
    Build application and run - > Cube isn't spawning, opertation stops at initializing but downloading bundle, you can look to output_log.txt

    http://www.mediafire.com/file/f57sqa6b5kzk0ru/TestsToAssetBundles.zip
     
  2. Nirvan

    Nirvan

    Joined:
    Nov 16, 2013
    Posts:
    134
    Seriously no one will help me with that? even Unity?
     
  3. ccklokwerks

    ccklokwerks

    Joined:
    Oct 21, 2014
    Posts:
    62
    Well, I am not working with the most up-to-date version of Unity so I could not get your sample project to work...

    But why not load the asset bundle manually, considering the manager seems to be giving you grief?

    This is the little coroutine I use to load asset bundles in my code. All you need to do is determine the file path...

    private static IEnumerator LoadAssetBundleCoroutine(string filePath, Action<AssetBundle> completionAction)
    {
    var createRequest = AssetBundle.LoadFromFileAsync(filePath);
    yield return createRequest;

    AssetBundle b = createRequest.assetBundle;
    completionAction(b);
    }
     
  4. Nirvan

    Nirvan

    Joined:
    Nov 16, 2013
    Posts:
    134
    I'd like to use some management which manager gives, to avoid troubles with dependencies, etc. but thanks, I will try do some with your suggestion ;)