"No structure in SubCategoryObject in pin" with custom USTRUCT parameter

I’ve got a custom UActorComponent that fires events when certain touch gestures are recognised. Most of these event delegates pass a custom USTRUCT parameter, which contains both a pixel screen location and a normalised screen location.

I’ve defined the struct as follows:

USTRUCT(BlueprintType)
struct FScreenLocation
{
    GENERATED_USTRUCT_BODY()

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    FVector2D Actual;

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    FVector2D Normalised;

    FScreenLocation() {}
    FScreenLocation(FVector2D actual, FVector2D normalised)
    {
        Actual = actual;
        Normalised = normalised;
    }
};

And my delegates are defined as follows:

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnTapAndHoldDelegate, ETouchIndex::Type, FingerIndex, FScreenLocation, ScreenLocation);

// Triggered when the user holds their finger in the one spot for a period of time.
UPROPERTY(BlueprintAssignable, Category = "Touch Input", meta = (DisplayName = "Tap and Hold"))
FOnTapAndHoldDelegate OnTapAndHold;

The event itself works completely fine and the vectors have correct values, but when I compile the Blueprint Actor that is using the component, I get an error wherever my custom struct is used, saying “No structure in SubCategoryObject in pin Screen Location”:

49996-blueprint_compile_error.png

When I try refreshing those nodes like the error says, the node loses all of its outputs and becomes an empty box that still has an ERROR! below it.

I can easily work around this by removing the struct, but it makes for some long and awkward function signatures.

It looks to me like your node does not match your delegate markup. you might want to delete that node.

The node should only be showing the ‘ScreenLocation’ property, not the inner properties