Can I create a scenecomponent blueprint based on my own scenecomponent?

I want to create a new scene component that can be attached to particular actors.

Some of the behaviour must be done in code since it interacts with a custom networking stack.
But a part of this component must be customizable by the art team.

I thought that I could just create a UCustomBaseComponent in C++ which derives from USceneComponent, write all the code I need and then create a CustomComponent blueprint that derives from UCustomBaseComponent and place here all the parts the art team will fiddle with.

But it doesn’t look like I can do that, the only options I get for classes to extend are the engine SceneComponents.
:confused:

Do you have a code example / snippets we can see in order to help debug your issue? For instance, headers and project setup.

As simple as it comes.
It’s an empty project with a single added class UBaseCustomComponent which derives from USceneComponent.

If I try to create a new blueprint based on this new class, all I get is a message telling me this is not possible.
Is there any way to do something like this?

I can create Blueprints based on USceneComponent, but not on classes which derive from USceneComponent? :confused:

Just to be certian, when you add it, do you go back into the editor and tell it to recompile and hotload the components? Sometimes I have this happen where the classes are not hotloaded back in properly, and the references are bad. Try closing the editor. Opening the folder path, delete any compiled .dlls for your game code (so the compile code for your API), open the project, and let it rebuild - see if that might help.

Yeah, that’s not it.
If you open the attached project, everything gets recompiled before the editor opens so everything is fresh and clean.

The problem is the restriction that disallows blueprint deriving classes that inherit SceneComponent.
Wanted to know if there is any way to go around that or why the restriction is in place.

You must add Blueprintable to the UClass() as follows:

UCLASS(Blueprintable)
class MY_API UMyClass: public USceneComponent
{
    // Implement..
}
1 Like