Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by assaf.mendelson · Dec 22, 2011 at 10:10 PM · exportpackagepipelineexportingautomatically

Creating a unity package automatically

Hi, We are doing a unity package which depends on all kind of external items. We also have a nightly build in which we compile and update everything. This results in a nightly installer. Today, I need to create our package manually every time. This involves changing a couple of assets (importing them) and then exporting everything as a package. I would like to do this automatically (unattended). What I would like to do is overwrite the relevant files in the file system (including changing stuff like version number in existing scripts) and then run unity to import/recompile the assets (and give me an error message if relevant), choose some of the files recursively (i.e. everything excluding the asset store tools directory) and export a package including them to a predefined location. Is there a way to do this? Thanks.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image assaf.mendelson · Dec 28, 2011 at 09:03 AM 0
Share

Anyone knows the answer for this?

5 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by kork · Sep 02, 2013 at 01:34 PM

Probably a bit late, but maybe someone else stumbles upon this: You could use uTomate for this. With this you can build an automation plan to export stuff from your project using the export unity package action. You can also run uTomate from the command line so you can incorporate this into your nightly builds.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TonyLi · Mar 26, 2014 at 05:23 PM 0
Share

+1. u$$anonymous$$ate does this very well, and so much more. It's the #1 tool that Unity developers shouldn't be without.

avatar image
0

Answer by TowerOfBricks · Dec 28, 2011 at 03:38 PM

There are ways to do that, try writing an editor script using the AssetDatabase class. http://unity3d.com/support/documentation/ScriptReference/AssetDatabase.html It has got an ExportPackage and ImportPackage function. But out of own experience, don't export a package just to import another one later in the same script, unity needs some time importing and compiling the stuff, I almost lost half of my project code that way because unity overwrote it. Changing version numbers can be done using System.IO classes, see tutorials on editing text files.

I can confirm that this can work really well as I have a script which at the click of a button exports a backup (always do this, trust me), then edits scripts automatically, hard coding #ifs and such, and then exports some folders of my choice to a target location.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image assaf.mendelson · Dec 29, 2011 at 10:54 AM 0
Share

Thanks for the response, is there a way to do this from the command line? i.e. I don't want to manually open up unity but rather for a script which runs over night to do everything

avatar image TowerOfBricks · Dec 29, 2011 at 10:56 AM 0
Share

Don't think so unfortunately, you would have to open up Unity and click some button there.

avatar image
0

Answer by frarees · Sep 02, 2013 at 01:49 PM

Use AssetDatabase.ExportPackage. Create a static method that creates the package in order to call it from command line. See this for reference. -executeMethod is what you want.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by error0 · Mar 26, 2014 at 02:59 PM

This is a really late answer to this problem, but as I searched for it and came across this answer, I felt the need to contribute for those who may come after me. uTomate is a really good solution, but if you feel the need to build it yourself, you can call editor scripts from the command line. We use the Unity3dBuilder to integrate our Unity projects with Jenkins, and this is what that project does. Hopefully this information helps others.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by iwHiteRabbiT · Oct 01, 2014 at 10:57 AM

I recently had a similar problem, I had to manage several unity packages within a project, and maintain them updated.

I have developed a tool for this, you can find it on the asset store under the name Custom Package.

Hope this will meet your expectations.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Building my Game 0 Answers

How to export to gradle using BuildPipeline.BuildPlayer 2 Answers

Blender Modeling To Unity 3D. 1 Answer

Include parent/super class in a package export? 1 Answer

Export Package Asset Path Issue 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges