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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Scripting BuildAssetBundles signature has changed. error

Discussion in '5.4 Beta' started by Dynamoid-Megan, Mar 24, 2016.

  1. Dynamoid-Megan

    Dynamoid-Megan

    Joined:
    Apr 16, 2015
    Posts:
    72
    I am using 5.4 b11 and getting this error after following the documentation to create an asset bundle.

    Assets/Editor/CreateAssetBundles.cs(8,31): error CS0619: `UnityEditor.BuildPipeline.BuildAssetBundles(string)' is obsolete: `BuildAssetBundles signature has changed. Please specify the targetPlatform parameter'

    It works fine in 5.3! What do I have to do to update this script so it will work in WebGL target?
     
  2. Dynamoid-Megan

    Dynamoid-Megan

    Joined:
    Apr 16, 2015
    Posts:
    72
    Still works great in latest release of 5.3, and I got it loading asset bundles in WebGL by turning off engine code stripping. No idea how to alter the snippet outlined in the official documentation to make it work in 5.4, has anyone run into this yet?
     
  3. Alex-Lian

    Alex-Lian

    Guest

    Indeed, we need to get our scripting reference updated.
    It's BuildAssetBundles(string outputPath, AssetBundleBuild[] builds, BuildAssetBundlesOptions assetBundleOptions, BuildTarget targetPlatform)
     
  4. Dynamoid-Megan

    Dynamoid-Megan

    Joined:
    Apr 16, 2015
    Posts:
    72
    Thank you so much!