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 Chris-Tenbrink · Jan 16, 2013 at 01:18 AM · importpackagecommand-line

Automate importing of .unitypackages?

We have several third-party packages that we'd like to integrate into our Unity project. We've checked the .unitypackage files into our source control system (subversion). We have an automated build process that builds the unity project. It uses the following command line:

 /Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -projectPath <path/to/project> -executeMethod <method_that_executes_build>

Before we execute this step, we'd like to import these third-party packages into our project. I've tried the -importProject command-line option. The problem is that some of our .cs scripts reference classes declared in .cs scripts found in the third-party packages. Thus, unity throws an error when compiling our script because the .cs files from the .unitypackages haven't been imported and don't yet exist on the system. Importing manually in the Unity GUI environment isn't a problem - the compiler errors are listed but go away when you import the packages (Assets/Import Package/Custom Package). However, when run from the command-line, Unity exits unsuccessfully when it encounters the first compile error.

Is there a way to force the project to import packages before trying to compile our .cs scripts?

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 JanNordenTobii · Apr 16, 2018 at 09:50 AM 0
Share

This seems to still not work. A real showstopper for automated builds.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by HSz · Jul 11, 2014 at 10:20 AM

Just for future reference, we are using uTomate (https://www.assetstore.unity3d.com/en/#!/content/7703) to do something similar. They have a package-import action.

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 · Jul 11, 2014 at 03:52 PM 0
Share
  • for u$$anonymous$$ate. It's invaluable for tasks like this.

avatar image
0

Answer by Cardinalby · May 19, 2015 at 07:18 PM

Move your editor script which imports packages into dll, place dll in Editor folder and it will work fine even if there are compile errors in your project

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

11 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 avatar image

Related Questions

Strange crash on package import 1 Answer

Script Compiller errors. need help fixing 1 Answer

[SOLVED]Firebase Remote Config and Facebook Audience Network SDK conflict 1 Answer

Importing assets breaks my game 1 Answer

The script of the imported object disappears. 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