Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Unity 2022.3.2f1 batchmode hangs on revfreshing native plugins

Discussion in 'Editor & General Support' started by Deathwing, Jun 15, 2023.

  1. Deathwing


    May 8, 2013
    Hey guys,

    we just updated from Unity 2022.2.XX to the LTS 2022.3.2f1. We use Unity on our M1 Macs.

    When we now try to make a build via CLI, unity becomes stale after 'Refreshing native plugins compatible for Editor '.

    We start unity like this:
    /Applications/Unity/Hub/Editor/2022.3.2f1/ -batchmode -nographics -projectPath $(pwd) -executeMethod BuildScript.Build -buildTarget iOS -quit

    the last lines of the logs look like this:
    Start importing Packages/com.unity.modules.uielements/package.ModuleCompilationTrigger using Guid(8a752aaaadd2410dd9a84e01c1bace9f) Importer(-1,00000000000000000000000000000000)  -> (artifact id: 'f47c08d8297413b7bb65b64358c8d75a') in 0.000552 seconds

    Start importing Packages/com.unity.modules.umbra/package.ModuleCompilationTrigger using Guid(1b6246f2248883964991eac9e9b4817c) Importer(-1,00000000000000000000000000000000) -> (artifact id: '94d392e4553521c5a25bc32d17c75fb0') in 0.000522 seconds

    Start importing Packages/com.unity.modules.terrainphysics/package.ModuleCompilationTrigger using Guid(cbb1a39d56ce4d9ac1a46ac505893fa7) Importer(-1,00000000000000000000000000000000) -> (artifact id: '98b919966ab363a4c4ee6c7468f98633') in 0.000497 seconds

    Start importing Packages/com.unity.modules.animation/package.ModuleCompilationTrigger using Guid(db8e609a39b9b231fccc54e5fa4cbd1b) Importer(-1,00000000000000000000000000000000) -> (artifact id: 'c19e35bc818eacdec0d71fc29b6f419c') in 0.000418 seconds

    Start importing Packages/com.unity.modules.physics/package.ModuleCompilationTrigger using Guid(5c1ee4056d0ac7ad3c5a16597fcaa38a) Importer(-1,00000000000000000000000000000000) -> (artifact id: 'e7d8d6b430389f69a13032c5a4e700b5') in 0.000413 seconds

    Start importing Packages/com.unity.modules.subsystems/package.ModuleCompilationTrigger using Guid(8d4bc6bfa28760b29f13174d6b6ea710) Importer(-1,00000000000000000000000000000000) -> (artifact id: '2c935006139ac2e80aa510ae54d59208') in 0.000527 seconds

    Start importing Packages/com.unity.modules.screencapture/package.ModuleCompilationTrigger using Guid(cd561f5f687aed43bf280c27a84f79e3) Importer(-1,00000000000000000000000000000000) -> (artifact id: 'f0d56b5144b4707feba9a1b583a5d9ab') in 0.000520 seconds

    Start importing Packages/com.unity.modules.unitywebrequestwww/package.ModuleCompilationTrigger using Guid(ae87256f29d9c8b50490f4caf75b2c41) Importer(-1,00000000000000000000000000000000) -> (artifact id: '2bea182a0d15c36db9a34766a6e92ef6') in 0.000503 seconds

    Start importing Packages/com.unity.modules.imgui/package.ModuleCompilationTrigger using Guid(be13c398521e3c1ad21fb9da30ab2ab6) Importer(-1,00000000000000000000000000000000) -> (artifact id: 'fb0254cf6fb92f161fb370419b870ba2') in 0.000435 seconds

    Start importing Packages/com.unity.modules.physics2d/package.ModuleCompilationTrigger using Guid(fe6a6957b37b61417b457a1e0541791d) Importer(-1,00000000000000000000000000000000) -> (artifact id: '6dd9dd594baf916b36a412720c0b0e0f') in 0.000411 seconds

    Refreshing native plugins compatible for Editor in 16.69 ms, found 8 plugins.

    Native extension for iOS target not found

    Native extension for Android target not found

    Native extension for OSXStandalone target not found

    Native extension for WebGL target not found

    We even tried a clean build (completely wiped Library folder), no matter what, Unity can't pass that step :)
    In 2022.2.XX we had to update the EditorSettings.asset to set m_RefreshImportMode to 0 because worker threads on the import were not working in batch mode on Mac with no graphics, but that option, neither on nor off, is fixing the issues with the hanging.

    I compared the logs against builds from 2022.2.XX, it seems the next step would normally be running [InitializeOnLoad] code, and afterward continuing importing...

    Has anyone had the same issue or found a solution?

    Last edited: Jun 15, 2023