Content Pipeline: Build‑time vs. Runtime Asset Loading Decision
0 reputation · 28 Oct 2021, 07:49 UTC
Content Pipeline: Build‑time vs. Runtime Asset Loading Decision
The MonoGame Content Pipeline compiles assets into platform‑specific .xnb files, which are then loaded at runtime via ContentManager.Load<T>(). An alternative is to bypass the pipeline and load assets directly at runtime using Texture2D.FromStream or custom importers. This choice impacts cross‑platform compatibility, load performance, and packaging strategy.
Current uncertainty centers on whether to rely exclusively on build‑time compilation or to support runtime loading for dynamic content or modding. The decision is unresolved because MonoGame does not prescribe a single approach, and platform support varies.
Key questions:
- How does runtime loading affect cross‑platform compatibility and the ability to use a single asset bundle?
- What are the performance differences between build‑time compiled .xnb assets and runtime loaded assets on DesktopGL, Android, and iOS?
- Does enabling runtime loading interfere with the Content Pipeline’s caching mechanisms or packaging requirements?