Import progress doesn't count downloaded bytes
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
GLTFSceneImporter.LoadSceneAsync と ImportProgress および UnityWebRequestLoader のエントリーポイントから開始し、buffer、node、texture のインポートが始まる前に Web ダウンロードがどのように進捗を報告するかを追跡します。完了条件は、Web モデルのダウンロード中に ImportProgress がダウンロード済みバイト数を反映し、処理全体を通してローディングバーが進むことです。この issue ではファイルやテストは指定されていません。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C#
- スター
- 2.3k
- フォーク
- 539
- 平均マージ
- 3日 15時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
KhronosGroup/UnityGLTF のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
KhronosGroup/UnityGLTF#911 · コメント 6 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
KhronosGroup/UnityGLTF#894 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
KhronosGroup/UnityGLTF#893 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
KhronosGroup/UnityGLTF#890 · コメント 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
KhronosGroup/UnityGLTF#889 · コメント 1 件 ·
KhronosGroup/UnityGLTF の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Realm667/WolfenDoom#1758 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
AI documentation good first issue help wanted
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Keboo/SimplyBudget#334 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信