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. Dismiss Notice

Create AssetBundle in Runtime or any other method?

Discussion in 'Asset Bundles' started by yudzyoga, Feb 23, 2022.

  1. yudzyoga

    yudzyoga

    Joined:
    Sep 3, 2021
    Posts:
    1
    Hi All!,
    I'm trying to create multi-platform unity integration and I've got a case in which I should create the asset bundle in Unity desktop then upload it to a local server, the bundle will later be downloaded in Unity mobile to be shown. I've tried to build the asset at Runtime but it shows compilation error as it is not allowed to do the BuildPipeline in Runtime (should be in Editor). Does anyone have any info about how to do it (other than doing it manually in Editor)? or maybe any 3rd party libs that may help? thanks in advance!
     
  2. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    212
    If I should do it I will take a look on this: https://docs.unity3d.com/Manual/CommandLineArguments.html

    Maybe when you run your standalone project you can use the batch mode to call unity editor with a static method call to build your assetbundle.

    -batchmode -nographics -executeMethod <ClassName.MethodName>