Class ZipAssetSource

java.lang.Object
dev.engine.core.asset.ZipAssetSource
All Implemented Interfaces:
AssetSource, AutoCloseable

public class ZipAssetSource extends Object implements AssetSource, AutoCloseable
Asset source that reads from a ZIP/archive file. Useful for bundled assets, Sketchfab downloads, mod packages, etc.

Paths inside the archive are relative: "textures/albedo.png" matches a ZIP entry "textures/albedo.png" or "model/textures/albedo.png" with an optional strip prefix.

  • Constructor Details

    • ZipAssetSource

      public ZipAssetSource(Path archivePath, String stripPrefix)
      Parameters:
      archivePath - path to the .zip file
      stripPrefix - optional prefix to strip from entry names (e.g. "model/")
    • ZipAssetSource

      public ZipAssetSource(Path archivePath)
  • Method Details