Hello there. Could you help me please? We are trying to use Needle engine to export VFX from Unity to three.js project (our project compiled through Webpack) and we canât seem to do anything that works. Do you have any ideas why that can be happening?
I created a particle system in Unity and exported it as a .gltf and .bin (with textures).
Our developer trying this process to insert it into the project with no avail:
Installed dependencies: npm i @needle-tools/engine
In main.ts:
import { NeedleEngine } from â@needle-tools/engineâ;
import * as THREE from âthreeâ;
function onStart() {
NeedleEngine.addContextCreatedCallback(args =>{
console.log(âNeedle createdâ);
});
}
However, the project doesnât build with webpack.
If you add the following to webpack.config:
resolve: {
alias: {
â@needle-tools/engineâ: path.resolve(__dirname, ââŠ/node_modules/@needle-tools/engine/dist/needle-engine.light.umd.cjsâ),
},
},
Then the project builds, but NeedleEngine.addContextCreatedCallback still doesnât get called.

Original Post on Discord
by user 120268259151839232
Do you get any errors?
We have a nextjs sample which also uses webpack under the hood. You will probably not be able to use this directly but maybe it helps if you take a look at the plugin there to see what weâre doing for next/webpack support: nextjs-sample/next.config.js at main · needle-engine/nextjs-sample · GitHub
How do you export your gltf file? By default we export to glb - this is not configureable. So I assume youâre going another route? Are you exporting via context menu and if so: why?
I will ask him. And hand this information. Thank you!
by user 120268259151839232
Alright - let us know if you succeed or not 
I export particle system by placing prefab of it into âexportâ derictory in scene
by user 120268259151839232
Iâm not sure I understand - which export directory? Or do you mean inside a GltfObject
component?
Wait Iâll make you a screen
by user 120268259151839232

by user 120268259151839232
I put it there and when I save it appears as those .bin and .gltf files
by user 120268259151839232
Do you perhaps have a GltfObject on the Export GameObject as well? Or some other component?
Can you show me the components on Export and on VFXPixelFire?
No I donât. I just place it there as a prefab.
As I remember this âGltfObjectâ is a component that I need to add in inspector right? It can be the reason why vfx doesnât export properly? This one is from âeportâ inspector
by user 120268259151839232
this one from vfx prefab
by user 120268259151839232
This will not export the gltf or bin. At least I canât see why/how and as said before our export does currently export to glb by default.
The prefab as child of the ExportInfo will not do anything. Are you sure no other script is referencing this prefab? Or you exported it another way?
I canât answer that. I have little experience with scripts. How do I check if it is?
by user 120268259151839232
Ah wait
by user 120268259151839232
I remember doing this
by user 120268259151839232