Provide default behavior for asset compiler dependencies

Aperta
#3,794 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
build-system

Direzione di ricerca

Start with the follow-up discussion in #3752 and the existing GetRuntimeTypes(Entity) and GetInputFiles implementations the issue names, especially the heightfield layers. Nothing here specifies a change yet, so the first step is agreeing on the DataDependency design with maintainers. Done would mean an accepted design, not a patch.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area-Asset enhancement
Stride version

Latest git

Platforms

Windows, Linux, macOS, Android, iOS, Game Studio (editor)

Graphics API

No response

What happens

Followup to the discussion started in #3752

This discussion covers the idea of collecting referenced assets by default in engine and user asset compilers.

Right now those dependencies are listed manually through each asset compilers' implementation. It's a fair amount of boilerplate, and is prone to errors.

Here's the proposal xen2 / xen2's bot advanced:

A better default could have two parts that go together:

  1. Unlisted content references become Runtime dependencies instead of being dropped (no build order, no hash, cycles are fine). Scenes and prefabs already get this through GetRuntimeTypes(Entity).
  2. CompileContent stays opt-in, declared by the object that loads the content (like the heightfield displacement feature) and collected by a shared visitor in core. That also removes the GetInputFiles boilerplate in the heightfield layers.

What I had in mind was quite similar, where content references would be raised into runtime dependencies by default, then each asset compiler would mutate that by changing an enum associated with those dependencies, something like DataDependency { UsedAtRuntimeOnly, DataReadDuringBuildOnly, ReadDuringBuildAndUsedAtRuntime, DependencyIsUnused }.

Cyclic references are an issue regardless of how we end up dealing with this, but we can improve this by making the API clear and succinct.

Steps to reproduce

N.A.

Log and callstack

Screenshots and other details

No response

Lingua principale
C#
Stelle
8k
Fork
1.2k
Merge medio
2g 7h
PR unite (30g)
316

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stride3d/stride

Tutte le issue di stride3d/stride

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.