Reuse the meshes built at build time in a runtime player

Đang mở
#106 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, unity
Lĩnh vực
game-dev

Hướng nghiên cứu

Start with KeepsItsSavedMeshes and CanSkipTreeUpdate, then trace how the build step writes model meshes and how ChiselRuntime.Update() decides to rebuild them. The issue leaves the player asset identity or reuse strategy open, so compare the editor and player paths before choosing an approach. Done means an unchanged model is not rebuilt on the first player update, verified in a player build, with a clear shared name and code explanation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

task

In a runtime player (CSG in the player, #64), the first ChiselRuntime.Update() rebuilds every model, although the build step already built them and their meshes are in the scene.

Saved mesh reuse
In the editor, a model keeps the meshes saved with its scene instead of running the CSG when it is loaded, as long as those meshes are still what its input builds. The editor decides this by comparing an input hash stored with the model to a hash of its current input. That hash identifies materials and other assets through AssetDatabase, which a player doesn't have. In the code this is the "saved output" skip (KeepsItsSavedMeshes, CanSkipTreeUpdate); it should get a clearer name.

For a runtime player

  • A player can't use AssetDatabase, but it also has more control: every model in it was built at build time, from inputs the build knows.
  • The build step stores what a player needs to decide a model's meshes are current, so a model is only rebuilt after something in it changed.
  • Find a stable identity for materials and other referenced assets in a player, or avoid needing one (the build step knows its meshes are current when it writes them).

Done when

  • In a runtime player, the first ChiselRuntime.Update() doesn't rebuild models that weren't changed, tested in a player build.
  • The editor and player versions share a clear name and an explanation in the code.
Ngôn ngữ chính
C#
Star
135
Fork
15
Merge trung bình
24 phút
Pull request đã merge (30 ngày)
90

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RadicalCSG/com.chisel

Tất cả issue của RadicalCSG/com.chisel

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.