Please help solve the problem. I create a class inherited from USkeletalMeshComponent, created for him UFactory. It allows create the Asset from this class. But it is impossible to load it in the runtime (StaticLoadObject). All I could find - Answerhub but did not understand how to use it.
That answer hub question is not related to runtime asset loading.
Why do you say it’s impossible to do? What have you tried, and what isn’t working?
Maybe more to the point, is there a particular reason you wanted to create an asset of a component? It’s not a standard approach, normally you would just create a blueprint of the component class, configure it’s properties, and then create an object from the blueprint at runtime.
Sorry, I did not want to say that this is impossible. (English for me foreign language). Now I found that the loaded component returns nullptr GetOwner() when call ->RegisterComponent();
I was trying to create a component with some additional options, with the ability to create asset in the content browser. And dynamic load it in runtime.
If I extend USkeletalComponent via blueprint and add some parameters, i cant access them through code… or not?
Extending the component through C++ is of course fine. I’m just not sure why you want to be able to create an asset of it. Instead you can just create one or more blueprints based on your custom C++ class, configure the properties in the blueprints, and then instantiate them at runtime. It’s essentially the same thing, I don’t think you really gain anything by having a factory.