Reuse the meshes built at build time in a runtime player

Abierto
#106 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
csharp, unity
Área
game-dev

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
C#
Estrellas
135
Forks
15
Merge medio
24 min
PR fusionados (30 d)
90

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RadicalCSG/com.chisel

Todos los issues de RadicalCSG/com.chisel

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.