AssetDatabase.ExportPackage not working

Hi,

I am trying to include the project settings with the assets in a unity package. Since the unity editor does not include the option to include project settings, I am writing a simple editor script to do so.

I am trying this:

AssetDatabase.ExportPackage(“Assets/”, “Entire Project.unitypackage”, ExportPackageOptions.Recurse | ExportPackageOptions.IncludeLibraryAssets );

This should bundle all my assets in Assets folder along with the project settings. However when I see the exported package it only include the project settings and no assets.

Please help.

Thanks
Gaurav

this is worked for me

AssetDatabase.ExportPackage("Assets", "Entire Project.unitypackage",ExportPackageOptions.Interactive | ExportPackageOptions.Recurse | ExportPackageOptions.IncludeLibraryAssets|ExportPackageOptions.IncludeDependencies	);

Change Assets/ to Assets in your call to AssetDatabase.ExportPackage. The Unity doc examples that include the / appear to be mistakes.

AssetDatabase.ExportPackage(“Assets/XX”, “XX.unitypackage”, ExportPackageOptions.Recurse);

works for me.