Search Issue Tracker
Won't Fix
Votes
1
Found in
2018.4
2019.3.14f1
2019.4
2020.2
2021.1
2021.2
Issue ID
1307412
Regression
No
AssetDatabase.ImportPackage does not run via Command Line when -quit flag is added
Reproduction steps:
1. Unzip the attached "Test.zip" projet
2. Edit test.sh file by inserting the Unity Editor and project paths (test.sh file is located in the root directory of the attached zip)
3. Navigate to case_1307412\Assets\Editor and open PackageImporter script
4. Insert the path to the testPackage.unityPackage (package is located in the root directory of the attached zip)
5. Run test.sh file
6. Observe the assets in the case_1307412\Assets directory
Expected result: TestPackage folder appears, meaning that testPackage.unitypackage was successfully imported
Actual result: TestPackage folder does not appear, meaning that testPackage.unitypackage was not imported
Reproducible with: 2018.4.31f1, 2019.4.20f1, 2020.2.3f1, 2021.1.0b5, 2021.2.0a4
Notes:
1. Package is successfully imported when -quit flag is not added
2. Reproducible on Windows, Mac and Linux
Comments (1)
-
ccw3
Jan 28, 2025 10:57
It will very appreciate add a note in the documentation of AssetDatabase.ImportPackage to specify behaviour with the "workaround" of callbacks and -quit flag removeal when Unity Editor runs in batchmode
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
Resolution Note (2021.2.X):
Importing a package needs to be delayed, so the workaround the user is doing is the right way to do it. AssetDatabase.ImportPackage will stay the same by design. Making changes in AssetDatabase.ImportPackage will bring more risks than solutions. Workaround is using the callbacks to wait until the import is completed, then quit the application by script.