stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

3h 15m 28s logged

export dependencies + prefab asset loading

redid how exporting figures out what needs to go into the package

previously editor export was basically much closer to just packing the project directory. now it builds a dependency manifest first

figuring out what to export

export starts from the project + scenes and follows the things they reference:

  • catalog assets used by entities, maps, UI and post processing
  • map files
  • attached ObSL scripts
  • script using imports
  • scenes loaded from scripts
  • prefabs instantiated from scripts
  • music / sound files
  • material textures + shaders
  • animation sheets
  • shader #includes

referenced scenes and prefabs get scanned too, dependencies keep chaining from there.

it then generates a new filtered assets.json specifically for the package instead of sticking the entire project catalog in there.

the actual project’s catalog is untouched.

script analysis

added a ScriptAssetAnalyzer which walks the ObSL AST without actually running anything.

literal stuff can be narrowed down properly, including things like:

PlayMusic("assets/audio/music.ogg", 1.0)

or even constant string concatenation…

asset setters like SetTexture / SetFont get tracked too.

if a texture or font ID is dynamic, export keeps that entire asset category.
if a runtime file path for stuff like LoadScene, Instantiate, PlayMusic or PlaySound2D can’t be figured out, it falls back to keeping the eligible project files + full asset catalog.
unknown / indirect calls are done the same too

so simple projects get smaller exports, while weird dynamic scripting should still work…

.pakignore still applies, and required files being missing or ignored is now an export error

prefab assets

also fixed prefabs properly interacting with the lazy asset system.

instantiating a prefab now scans its components, acquires whatever catalog assets it needs, resolves their dependencies, and retains them in the scene before creating the entity.

so a prefab can use an asset that wasn’t already referenced by the scene and it should just work.

scene asset scopes got changed a bit for this too. instead of accumulating a new scope every time something acquires assets, they’re merged into one scene scope and duplicate asset references are ignored.

also made prefab revert a little safer so the old entity isn’t destroyed unless the replacement prefab actually instantiated successfully.

packaging / ci things

editor packaging is stricter in general now. script dependency validation can fail the export, missing dependencies stop it, and PackageCurrentProject reports failure so the rest of the export doesn’t continue pretending everything is fine.

shader includes are followed during dependency collection too, while the engine shader helpers still get bundled for runtime includes.

also cleaned up CI a decent bit…

also some more tests too for the packaging and script analysis

lowk sorry for just posting an image of the logs idk how else to show it since it’s mostly backend / file stuff 😭

0
43

Comments 0

No comments yet. Be the first!