UInterface C++ class does not show up as type in BluePrintEditor

I have a class which has a getSomething() function that I want to return an Interface.

So that class header looks something like this

UCLASS()
class TEST_API AMyPawn: public ADefaultPawn
{
	GENERATED_BODY()

public:
    UFUNCTION(BlueprintCallable, Category = "Stuff")
        TScriptInterface<ISomethingInterface> getSomething();

private:
    UPROPERTY(EditAnywhere)
        TScriptInterface<ISomethingInterface> ourSomething;
}

then I have two implementaitons of an interface. The interface header looks like this:

UINTERFACE(meta=(CannotImplementInterfaceInBlueprint))
class USomethingInterface : public UInterface
{
	GENERATED_UINTERFACE_BODY()
};


class TEST_API ISomethingInterface
{
	GENERATED_IINTERFACE_BODY()

	// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
	
    UFUNCTION(BlueprintCallable, Category = "Stuff")
    virtual FString  getType() const = 0;
};

It all compiles fine, but when I try to create a variable in BluePrint the SomethingInterface claasses are not availble to select, so I cant use the interface in my BluePrint. What do I do?

Add BlueprintType specifier to UINTERFACE to enable it as blueprint type

UINTERFACE(BlueprintType, meta=(CannotImplementInterfaceInBlueprint))

Normally you should do that with UCLASS too but it inheritable specifier and Actor class does that for you, and you need to do the same with USTRUCT

Exactly what I needed! Thanks