NeedleTools engine package dependency in production

Could you briefly describe what the workflow is right now what you’re aiming for?

My understanding right now is:
you work in Unity to change the scene and it exports e.g. on save / when clicking play to the local package and then you push to gitlab with the assets and files and the gitlab server should run compression/make the final build and deploy that to your server?

Exactly ! :+1:

by user 615280976855171083

Ah ok
I don’t think you can run the compression on a headless gitlab server with toktx / the gltf-transform version that is currently being used. Not sure if that’s something that becomes possible with the recent major release

But let me know how it goes

Yes, let’s see. :+1: Alright ! And thanks again. :wink:

by user 615280976855171083

That being said it’s on the roadmap to do exactly that and simplify the tooling one has to have installed locally :slightly_smiling_face:

Hey @totjoss any news on the gitlab deployment front? :slightly_smiling_face:

Nope, not yet. :sweat_smile:

by user 615280976855171083

Some news ! We’re finally back in deployment tests.
We do have an issue (which happens also in dev build on local machines) :
After setting the assets path, fi src/needle/assets, the GLTF file is exported there, as expected. Once building the project npm build (dev or production), this GLTF file is copied to dist/assets/, but the generated script still tries to load it in (dist/)src/needle/assets, which throws a 404.
I think there are multiple solutions to this :

  • Add a builtAssets parameter to specify where the assets should be after build.
  • Replace directly the custom path (given in Needle config file) by assets/ on build.
  • Create the missing directory tree and copying the GLTF file to the configured path dist/src/needle/assets. But this one would be a bad idea as we want different assets locations while coding and in production (just like regular web projects).

I think the best solution would be the first where we specify the output directory for assets built as we want it.

by user 615280976855171083

Hey sorry seems like this got a bit buried. I’ll try to reproduce it tomorrow. I think your suggestions sound good (1 or 2)

Little update: I’ve implemented a version of your second suggestion yesterday but didnt publish it yet because I want to test a little more in some of our more complex projects. Will most likely be in one of the next updates next week

Alright, awesome ! :sparkles: And no problem for the delay. :wink:

by user 615280976855171083