Import progress doesn't count downloaded bytes
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu tại GLTFSceneImporter.LoadSceneAsync và các điểm vào ImportProgress và UnityWebRequestLoader, sau đó lần theo cách các lượt tải xuống qua web báo cáo tiến trình trước khi quá trình import buffer, node và texture bắt đầu. Hoàn thành khi ImportProgress phản ánh số byte đã tải xuống trong lúc tải model qua web, để thanh tải có thể tiến triển trong suốt thao tác; issue không nêu tên file hoặc test nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 2.3k
- Fork
- 539
- Merge trung bình
- 3 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của KhronosGroup/UnityGLTF
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
KhronosGroup/UnityGLTF#911 · 6 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
KhronosGroup/UnityGLTF#894 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
KhronosGroup/UnityGLTF#893 · 1 bình luận ·
-
Vertex reordering after importĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
KhronosGroup/UnityGLTF#890 · 3 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
KhronosGroup/UnityGLTF#889 · 1 bình luận ·
Tất cả issue của KhronosGroup/UnityGLTF
Issue tương tự
-
launcher item missingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Realm667/WolfenDoom#1758 ·
-
SDK version compatibility issueĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
AI documentation good first issue help wanted
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Keboo/SimplyBudget#334 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày