Blueprint Functions break when project is reloaded.

I am creating a plugin and am attempting to write a simple blueprint function library of static utility functions. I have created a BlueprintFunctionLibrary class and can access and call the functions I have created from a blueprint event graph, however when the project is closed and re-opened any blueprints which reference the functions will not compile:

"Could not find a function named
“MyBlueprintFunction” in
'TestBlueprint` Make sure
‘TestBlueprint’ has been compiled for
MyBluerpintFunction

This occurs even though the relevant function exists in the list of functions in the editor and manually replacing the node with a new node allows the blueprint to compile. I am wondering if I am missing some step in BlueprintFunctionLibrary usage or if I am going about making a static callable blueprint function wrong.

Update: I have created a custom BlueprintFunctionLibrary class directly within a project, this exibited the same behavior of losing its linkage to the BFL and attempting to call the function on the Blueprint object itself. It seems there is currently no way to use custom BlueprintFunctionLibrary nodes in blueprints.

Reproduction:

Create a new C++ (Blueprint Function Library) class within the project,

Add the code below,

Create a new blueprint,

in your new blueprint add the TestBlueprintFunction node to the event graph and attach to OnBeginPlay event,

compile and save the blueprint,

note the blueprint compiles and the function is successfully called when executed,

save and close the UE4 Editor,

reopen the project,

open the blueprint,

note blueprint now has compile error and TestBlueprintFunction cannot be found.

Minimal Example Code:

TestBueprintLibrary.h

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "TestBlueprintLibrary.generated.h"

UCLASS()
class TESTPROJ_API UTestBlueprintLibrary: public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	
		UFUNCTION(BlueprintCallable, Category = "TEST")
		static void TestBlueprintFunction();
};

TestBueprintLibrary.cpp

#include "TestProj.h"
#include "TestBlueprintLibrary.h"


void UTestBlueprintLibrary::TestBlueprintFunction()
{
	UE_LOG(LogTemp, Display, TEXT("TEST BLUEPRINT FUNCTION CALLED!"));
}

Your issue doesn’t happen on my UE4 installation.

Ya turns out that this was caused due to me messing with object CDOs as a workaround for UE-42309.

It turns out this was caused by some other code I had written which was editing the object’s CDO, giving it owned complements as a workaround for UE-42309. This will not occur on a fresh project.