Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity instance stuck after successful build from batchmode (2018.4.3f1 LTS)

Discussion in 'Editor & General Support' started by abhijit_sketchup, Jul 12, 2019.

  1. abhijit_sketchup

    abhijit_sketchup

    Joined:
    Aug 31, 2018
    Posts:
    1
    I'm using command line args to build the app

    subprocess.call([unityPath, "-batchmode", "-nographics", "-quit", "-projectPath", unityProjDir, "-executeMethod", "BuildFunc.{0}".format(platform)])


    It builds fine but there's no return from this function and after looking into Editor.log, this was the last line.

    Batchmode quit successfully invoked - shutting down!
    ...
    Refresh: detecting if any assets need to be imported or removed ...
    An AssetDatabase Refresh is pending after a successful Package Manager request. You should not call AssetDatabase.Refresh at this time because it can lead to import-related errors.
    (Filename: C:\buildslave\unity\build\Modules/PackageManager/Editor/Public/PackageManagerApi.cpp Line: 205)


    After adding -noUpm to the args, everything works fine but I won't be able to use any TextMeshPro (since I'm disabling the Unity package manager) Any idea how to solve this?

    Happening on Unity 2018.4.3f1 and 2018.4.2f1. But works on Unity 2019.1.8
     
    tudonca likes this.
  2. tudonca

    tudonca

    Joined:
    Jun 27, 2019
    Posts:
    2
    Also running across the same issue, is there any way to prevent the AssetDatabase.Refresh?
     
  3. tudonca

    tudonca

    Joined:
    Jun 27, 2019
    Posts:
    2
    I had the same issue on Unity 2018.4

    I was able to fix this by manually calling AssetDatabase.Refresh() at the end of my build script, before Unity initiates the batchmode shutdown.