Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    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?