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

AssetBundle buildTarget for UWP

Discussion in 'Windows' started by miticatechnology, Aug 1, 2018.

  1. miticatechnology

    miticatechnology

    Joined:
    Oct 30, 2014
    Posts:
    14
    Hi,

    I'm generating assetBundles for a multiplatform app: android, ios and uwp. No problems in the editor, android or ios but not working on uwp devices. I don' know which one is the buildTarget for UWP platform. I have tried:

    - BuildTarget - StandaloneWindows. Error:

    The file can not be loaded because it was created for another build target that is no compatible with this platform.
    Please make sure to build AssetBundles using the build tagrget platform that is used by.
    File's Build target is: 5

    Error while getting assetbundle: xxxxxxxxxxxx can't be loaded because it was not built with the right version or build target.


    - BuildTarget - StandaloneWindows64. Error:

    The file can not be loaded because it was created for another build target that is no compatible with this platform.
    Please make sure to build AssetBundles using the build tagrget platform that is used by.
    File's Build target is: 19

    Error while getting assetbundle: xxxxxxxxxxxx can't be loaded because it was not built with the right version or build target.

    - BuildTarget - WSAPlayer. Error:

    Serialized file contains typetrees but the target can't use them. Will ignore typetrees.
    SEHException: external component has thrown an exception

    Could you help me please?
    Thanks
     
    Last edited: Aug 6, 2018
    lanyangyang likes this.
  2. miticatechnology

    miticatechnology

    Joined:
    Oct 30, 2014
    Posts:
    14
    I'm using Unity 2017.4.6

    Thanks!
     
  3. AiRobotMedia

    AiRobotMedia

    Joined:
    Jun 13, 2018
    Posts:
    61
    The Platform is Universal Windows Platform,
    The Build Type can be D3D or Xaml.
     
  4. miticatechnology

    miticatechnology

    Joined:
    Oct 30, 2014
    Posts:
    14
    Hi, thank you very much but that doesn't answer my question at all... I know that UWP is Universal Windows Platform...

    What I need to know is the BuildTarget for building AssetBundles for UWP,

    https://docs.unity3d.com/ScriptReference/BuildTarget.html

    thanks!
     
  5. miticatechnology

    miticatechnology

    Joined:
    Oct 30, 2014
    Posts:
    14
    Hi,

    I found the solution!!

    The build target is WSAPlayer with BuildAssetBundleOptions.DisableWriteTypeTree,

    thanks
     
    avikom and Raeza like this.
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    When you build asset bundle, you need to make sure that the scripting backend for UWP is set to whatever you will build your game as. IL2CPP and .NET scripting backends produce different asset bundles.