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

AssetDatabase.ExportPackage Problems

Discussion in 'Asset Database' started by Moe_Baker, Dec 16, 2017.

  1. Moe_Baker

    Moe_Baker

    Joined:
    Oct 22, 2017
    Posts:
    36
    I'm trying to write my own unity package exporter, something that can export project settings like when uploading a complete project via the asset store tools.
    currently stuck with two problems:
    • How to define the destination folder for the package, by default the package will be saved in the project folder but i can't find a way to change that.
    • adding the ExportPackageOptions.IncludeLibraryAssets flag to my Exporter will cause it to export some strange dependency files ? (check out image bellow), the package still seems to work as these file can't be exported but i get warnings when trying to import about the non local path and the package size increases dramatically.
    https://imgur.com/a/4rzFj

    the code I'm using is fairly straight forward & even using simple code such as
    Code (CSharp):
    1. AssetDatabase.ExportPackage("Assets", "Entire Project.unitypackage",ExportPackageOptions.Interactive | ExportPackageOptions.Recurse | ExportPackageOptions.IncludeLibraryAssets|ExportPackageOptions.IncludeDependencies    );
    will give me the same resault.