Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Errors when building asset bundles

Discussion in 'Editor & General Support' started by liortal, Mar 1, 2016.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    We started using asset bundles (using Unity 5.3.2p3).

    When building the bundles from a build script (that essentially calls BuildPipeline.BuildAssetBundles), we're getting many errors such as:

    Use IsAssetAvailable before calling AssetFromGUID
    UnityEditor.BuildPipeline:BuildAssetBundles(String, BuildAssetBundleOptions, BuildTarget)
    AssetBundles.BuildScript:BuildAssetBundles() (at Assets/AssetBundleManager/Editor/BuildScript.cs:24)
    AssetBundles.AssetBundlesMenuItems:BuildAssetBundlesAndCopyToStreamingAssetsPreBuild() (at Assets/AssetBundleManager/Editor/AssetbundlesMenuItems.cs:43)

    Variant folder path cannot be empty if we're building a variant AssetBundle.
    UnityEditor.BuildPipeline:BuildAssetBundles(String, BuildAssetBundleOptions, BuildTarget)
    AssetBundles.BuildScript:BuildAssetBundles() (at Assets/AssetBundleManager/Editor/BuildScript.cs:24)
    AssetBundles.AssetBundlesMenuItems:BuildAssetBundlesAndCopyToStreamingAssetsPreBuild() (at Assets/AssetBundleManager/Editor/AssetbundlesMenuItems.cs:43)

    Has anyone else seen these? what are they and is this a bug ?
     
  2. Mandoz

    Mandoz

    Joined:
    Aug 30, 2013
    Posts:
    9
    I also got this error and I couldn't find the reason.
    Please let me know if anyone know hot to fix it.

    Unity Version : 5.3.3.p3

    I've attached my code below.

    Code (CSharp):
    1. BuildPipeline.BuildAssetBundles(OutFolderPath, BuildAssetBundleOptions.DeterministicAssetBundle, buildTarget);
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    I think i saw a note that this is fixed in one of the latest 5.4 beta versions. So it should be available in 5.4 once it comes out.

    Perhaps it will also be backported to 5.3.x versions.
     
  4. frankgrandson

    frankgrandson

    Joined:
    Mar 14, 2016
    Posts:
    1
    Hi, any solution to this? I have the same problem now. How can I fix it? Thank you, best regards.
     
  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    This was fixed in 5.4.0 beta 9, which means the fix is going to be available in 5.4 once it's released (pretty soon i guess)