From first code, I’m taking that model and writing a new script (second one)in typescript, under scripts/src folder and then it’s automatically generating matching c# script in unity that I’m attaching to a empty gameobject.
by user 1000084301179785266
did i make it clear now atleast??
by user 1000084301179785266
Mind replying to that? Sorry but it’s still not clear
- you have a File
- you load that File’s arrayBuffer via a custom GLTFLoader
- at this point you have an Object3D that holds your new data.
- if the code you posted is in a component: just call
this.context.scene.add(gltf.scene)
; and you’re done. No need for the second script at all.
Damn!!
I was so dumb!! . First I should learn how three js works.
Thank you so much!!! It worked.
by user 1000084301179785266
I have this same sdk plug-in for Unity. Which contains multiple scripts and it big more complicated. To write similar typescript, seems huge task. Any alternative to make existing project in Unity work easily in needle!!
by user 1000084301179785266
You can freely decide where the boundary is - e.g. if that Avatar sdk generates data then you can export that data easily and don’t need to actually convert the Avatar sdk.
I get it. But the whole interactions scripts between game objects in Unity we have to recreate it, right??
by user 1000084301179785266
Runtime logic, yes. Many Unity built-in features like calling events, physics, etc are supported out of the box though.