Create GameObject from 3d Model ?

I am writing a script, it can automatically find the model file in the Resources folder (note : not a prefab), and then create a GameObject from the model file, I did not find the API, how can I do it?

If the model is not a prefab, I believe you are going to need an importer.

TriLib is an excellent plugin, I have used it myself.

What exactly is it you are trying to do? If you are just trying to swap the model of a pre-existing game object in scene. You can still load a prefab and then just copy the necessary component values.

I just found that GameObject.Instantiate can load fbx directly, that’s what I need

1 Like