Search Unity

  1. We want you to join us at GDC this year! Take a peek at all of the events we will be hosting during the week of GDC.
    Dismiss Notice
  2. Tell us about your experience here and you’ll get early access to the 2018 Game Studios report + more goodies.
    Dismiss Notice
  3. Unity 2017.3 has arrived! Read about it here.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  5. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice

Command Line -importPackage doesn't extract files in batch mode

Discussion in 'Editor & General Support' started by PDZ, Jul 25, 2016.

  1. PDZ


    Sep 12, 2013
    I'm trying to automate the process of updating a unity project with a package. From a bash script, I run:

    which updates the package as expected. The variables above are just directory paths as you might imagine.

    However when I try to run the same command with the -batchmode flag, the package does not get imported. There isn't anything amiss in the editor logs, and I've tried with Unity 5.1 and 5.3.4. It is as if Unity quits before it actually gets to import the files but it's imported the package. Or is that the way it is designed?

    Anyone having any similar issues?
  2. NachoFernandez


    Oct 3, 2017
    I am seeing similar issues, I wonder if this has been resolved :) (I'm on 5.6.1f1 (2860b30f0b54) revision 2646195)
  3. dklompmaker_aofl


    Apr 13, 2017
    Bumping this as we are seeing this too in 2017.2.1p2 Editor. Essentially, we call into AssetDatabase.ImportPackage during a command line method execution on Unity. The console reports that it is displaying a progress bar for importing the package however it is never imported.

    From another thread, we've learned that ImportPackage is non-blocking; therefore, we've tried a while loop that checks for the imported asset else Thread.sleeps. The problem here, is that it blocks the main thread which then must prevent the package from importing.

    Does anyone else have a work around for this?