Exporting without requiring children inside GltfObject?

Looking at needle-engine-support/documentation/deployment.md at main 路 needle-tools/needle-engine-support 路 GitHub I was wondering if there鈥檚 been thought on a different approach to support building for multiple targets without having to change the hierarchy of every scene.

Original Post on Discord

by user 106501920008445952

You mean because you need to add a GltfObject component right now?

Exactly. My understanding is you need a root GO with a GltfObject component, and only the children of that GO is exported.

by user 106501920008445952

Yes currently thats required for the root export scene. Plans are to remove that requirement.

Actually you can reference any other scene in your project (as a SceneAsset in one of your components) and it will be exported as a gltf (and you can deserialize as a AssetReference in typescript and load it from there)

There is a small sample in the https://docs.needle.tools repository and its how we built out website (all scenes on the website are separate unity scenes and loaded on the fly)

Ok. So theoretically I can take that approach and add a new scene with the required needle setup and reference the existing scene in that configuration to start adding web support with needle without too much other conflict

by user 106501920008445952

As long as I also turn off in settings taking over play and build.

by user 106501920008445952

Yes exactly. And you can still build via the Needle Engine platform (we could/should deprecate the build override setting too maybe?)

(or you can build via the menu items in 鈥淣eedle Engine鈥)

Cool. Going to play around with this early next week and document any pain points and then reply back to this thread so we can make improvements to that workflow.

by user 106501920008445952

Great thank you