- Home /
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
Answer by ahmed kamal · Jan 06, 2014 at 10:39 PM
this is worked for me
AssetDatabase.ExportPackage("Assets", "Entire Project.unitypackage",ExportPackageOptions.Interactive | ExportPackageOptions.Recurse | ExportPackageOptions.IncludeLibraryAssets|ExportPackageOptions.IncludeDependencies );
Answer by Stevens-R-Miller · Jun 13, 2018 at 08:16 PM
Change Assets/
to Assets
in your call to AssetDatabase.ExportPackage
. The Unity doc examples that include the /
appear to be mistakes.
Answer by yurenjimi · Apr 17, 2019 at 02:08 AM
AssetDatabase.ExportPackage("Assets/XX", "XX.unitypackage", ExportPackageOptions.Recurse);
works for me.
Your answer
Follow this Question
Related Questions
How can I select asset dependencies when using AssetDatabase.ExportPackage 0 Answers
Prefab lost connection with origin resources when imported using AssetDatabase.importPackage 0 Answers
Determining which Asset is connected to a GameObject. 3 Answers
Where are asset labels stored? 1 Answer
Get prefab's path in file system 2 Answers