Unable to use UnityGLTF in 2022.2.3f1 - Calls to "AssetDatabase.Refresh" are restricted during asset importing.

See original GitHub issue

I get these 3 errors always on import:

Calls to "AssetDatabase.Refresh" are restricted during asset importing. 
UnityEditor.AssetDatabase:Refresh ()
UnityGLTF.GLTFImporter:OnImportAsset (UnityEditor.AssetImporters.AssetImportContext) (at ./Library/PackageCache/org.khronos.unitygltf@dd0b8b2981/Editor/Scripts/GLTFImporter.cs:259)
UnityEditor.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext)

Calls to "AssetDatabase.SaveAssets" are restricted during asset importing. 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityGLTF.GLTFImporter:OnImportAsset (UnityEditor.AssetImporters.AssetImportContext) (at ./Library/PackageCache/org.khronos.unitygltf@dd0b8b2981/Editor/Scripts/GLTFImporter.cs:270)
UnityEditor.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext)

Calls to "AssetDatabase.Refresh" are restricted during asset importing. 
UnityEditor.AssetDatabase:Refresh ()
UnityGLTF.GLTFImporter:OnImportAsset (UnityEditor.AssetImporters.AssetImportContext) (at ./Library/PackageCache/org.khronos.unitygltf@dd0b8b2981/Editor/Scripts/GLTFImporter.cs:271)
UnityEditor.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext)

Tested in a new empty 2022.2.3f1 project using URP template, added UnityGLTF via git url in packman, tried to import this test model:

Scooter-Test-v7.glb.zip

Repro project:

Repro1.zip

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
hybridherbstcommented, Jul 17, 2023

I believe this is fixed for quite a while!

1reaction
ROBYER1commented, Jan 26, 2023

Also can you clarify if you mean 2020.2 (as in the title) or 2022.2 (as in the description)?

Edited to amend, sorry was a typo, the url I used was the one from the main page doc here https://github.com/prefrontalcortex/UnityGLTF.git?path=/UnityGLTF/Assets/UnityGLTF

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stuck at Initial Asset Database refresh (v2)
After I paste some asset into the Assets/ folder which doesn't have file extension, I encountered this problem. I simply deleted the wrong...
Read more >
Manual: Refreshing the Asset Database
Unity performs the following steps during an Asset Database refresh: ... This step restarts the Refresh() to ensure any new Scripted Importers take...
Read more >
unity - Do I always need to call SaveAssets & Refresh after ...
Refresh says it will import any assets that have changed their content modification data or have been added-removed to the project folder. The ......
Read more >
Fixing AssetDatabase.Refresh taking time after each code ...
Most times I change a script and save it I get a prompt: "Hold On" and "AssetDatabase.Refresh", taking 15 to 20 seconds. Similar...
Read more >
Unity - Refresh .asset after Destroying a Subasset
Try using AssetDatabase.Refresh after removing the rule instead of ImportAsset. "This will import any assets that have changed their content ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found