Why can't I make a component derived from Static Mesh Component?

When I make a new blueprint class, I cannot select any primitive component as the base class, until I get to Instanced Static Mesh Component, as you can see here:

Was just wondering why that is. :slight_smile:

I can’t tell you why but the easiest way to solve this, is by creating a C++ class that derives from UStaticMeshComponent and add the UClass meta data.


Then you have the most light class to directly derive from. You could of course add this to the engine UStaticMeshComponent class. But having a custom engine just for that is a bit unreasonable :smiley:

#pragma once

#include "CoreMinimal.h"
#include "Components/StaticMeshComponent.h"
#include "HighlightButtonBase.generated.h"

UCLASS(ClassGroup = Rendering, meta = (BlueprintSpawnableComponent), Blueprintable)
class CONFERENCEROOM_API UHighlightButtonBase : public UStaticMeshComponent

The accepted comment is definietly is the easier way to go, but there is a way to derive from the static mesh component without C++ parent class, and no programming required. If you are really desperate, you can do the following just as I did.


  1. Build the Engine From source (it would take 1-3 hours, you can delete it later, the source code need only temporary). Its not complicated and there is a step by step guide on the UE page, which is fairly good.
  2. After you done open the StaticMeshComponent.h and add “Blueprintable” to the UCLASS macro. Build.
  3. Create a temporary project and now you should be able to derive from the StaticMeshComponent. So make a child BP based on it.
  4. Migrate the created child BP to your main project. It should work as intended.
  5. ???
  6. Profit

Optional: You can delete the source project, and code if you want.

Note: This should work on most of the BP-s what arent blueprintable at first.