You might want/need to add “BlueprintType” to your UCLASS Macro. If it’s a component, then the meta “BlueprintSpawnableComponent” would likely also be needed.
Just an FYI: The use of BlueprintSpawnableComponent is limited to Components (so UActorComponent, for example). So if your class isn’t a component and adding that tag doesn’t work, at least you’ll know why
And if it’s still not working, do post back! Always start with the simplest of possible solutions and we can work our way through until we reach a proper answer.
For people who stumbled here.
In my case, I was inheriting from UActorComponent and BlueprintSpawnableComponent didn’t work. I had also to add:
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent), BlueprintType, Blueprintable )
Without Blueprintable it still wasn’t exposed for subclassing in the editor. (UE5)
Im just trying to make a simple c++ obj I`ve tried some things nothing works.
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "CPP_Object_1.generated.h"
/**
*
*/
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent), BlueprintType, Blueprintable )
class CODING_GROUND_API UCPP_Object_1 : public UObject
{
GENERATED_BODY()
private:
int OurPrivateIntegerVariable;
public:
int GetOurPrivateIntegerVariable();
void SetOurPrivateIntegerVariable(int NewValue);
};