in Game Dev+Unity

How to Export a Complete Unity Project

While working on Ultimate Endless Runner Kit I came across a problem. I had my own custom Layers and Tags to make use of the Unity’s physics editor to define which objects will interact/ collide with which. Exporting the assets folder in your project does not export the editor settings.

To export all the editor settings, you just need an editor script with the following lines of code:

1:            string[] projectContent = AssetDatabase.GetAllAssetPaths();  
2:            AssetDatabase.ExportPackage(projectContent, "UltimateTemplate.unitypackage", ExportPackageOptions.Recurse | ExportPackageOptions.IncludeLibraryAssets );  
3:            Debug.Log("Project Exported"); 

When you run the editor script, a package will be exported in your Unity project’s root directory and will have the name given in the second parameter of the ExportPackage function (right now its “UltimateTemplate”). This unity package will have all the editor settings along with everything in your project’s assets folder.

Drop in a comment if you have any questions.
Share this Post
Your URL copied
Comments on This Post
Let us know your thoughts about this topic

Your email address will not be published. Required fields are marked *