Download

Subclassing UFbxFactory to Return Custom Subclass

Hey,
So I want to save some metadata with my static meshes. I was hoping that I could create a factory that extended UFbxFactory, so I could import the static mesh, copy the data to a new object of my custom class and then return the custom class. However, when I call the super call to load the file, that automatically adds the new static mesh to the content browser, even if I return a different object from my subclassed factory method. I was able to sort-of circumvent this by creating a new object with a different name that has the copy of the mesh data that the super factory loads, but this results in two assets being generated.

I was wondering if there is a way for me to reuse the factory without copy and pasting the code, as there doesn’t seem to be a lot of documentation on reusing them. This solution could be as simple as deleting the other asset that’s generated from the super call, but I’m not sure that this is possible.

Thanks