Import progress doesn't count downloaded bytes
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia da GLTFSceneImporter.LoadSceneAsync e dai punti di ingresso ImportProgress e UnityWebRequestLoader, quindi traccia il modo in cui i download web riportano l’avanzamento prima che inizi l’importazione di buffer, nodi e texture. Il lavoro è completato quando ImportProgress riflette i byte scaricati durante il download del modello web, così che una barra di caricamento avanzi per tutta la durata dell’operazione; l’issue non indica file né test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug 💬
The implementation ImportProgress.Progress doesn't take into consideration the download bytes when importing models from the web.
This means that when importing a web model, the Progress value stays at 0 during all the download phase (which is generally the longest one), then it rapidly goes to 1 when importing buffers, nodes and textures.
In this way it is impossible to create a loading bar. The only alternative I found is to download the file separately and then import it as usual.
Steps to reproduce 🔢
Import a .glb from web url with LoadSceneAsync() like this
private CancellationTokenSource tokenSource;
string directory = Path.GetDirectoryName(someWebUrl);
string fileName = Path.GetFileName(someWebUrl);
...
ImportOptions importOpt = new ImportOptions
{
DataLoader = new UnityWebRequestLoader(directory),
CameraImport = CameraImportOption.None
};
GLTFSceneImporter importer = new GLTFSceneImporter(fileName, importOpt);
Progress<ImportProgress> progressReporter = new Progress<ImportProgress>();
progressReporter.ProgressChanged += OnImportProgress;
importCancellationTokenSource = new CancellationTokenSource();
await importer.LoadSceneAsync(-1, true, OnImportComplete, tokenSource.Token, progressReporter);
...
private void OnImportProgress(object sender, ImportProgress prog)
{
Debug.Log(Time.realTimeSinceStartup + " - " prog.ToString());
}
Notice how the logs show almost no progress while downloading, and then abruptly increase when the GLB import phase begins.
Files to reproduce the issue ♻
No response
Editor Version 🎲
6000.0.37
Render Pipeline and version
Any
Operating System 👩💻
Windows
When does this problem happen?
- Editor Import
- Runtime Import
- Editor Export
- Runtime Export
Additional Info 📜
No response
Validations 🩹
- I have searched existing issues: no issue already exist that reports the same problem.
- I follow the Code of Conduct
- provided a minimal reproducible example, including files when necessary.
- Lingua principale
- C#
- Stelle
- 2.3k
- Fork
- 539
- Merge medio
- 3g 15h
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KhronosGroup/UnityGLTF
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
KhronosGroup/UnityGLTF#911 · 6 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
KhronosGroup/UnityGLTF#894 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
KhronosGroup/UnityGLTF#893 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
KhronosGroup/UnityGLTF#890 · 3 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
KhronosGroup/UnityGLTF#889 · 1 commento ·
Tutte le issue di KhronosGroup/UnityGLTF
Issue simili
-
launcher item missingAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Realm667/WolfenDoom#1758 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
AI documentation good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Keboo/SimplyBudget#334 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno