# Blueprint Functions break when project is reloaded.

**URL:** <https://forums.unrealengine.com/t/blueprint-functions-break-when-project-is-reloaded/389303>\
**Category:** Plugins\
**Tags:** unreal-engine, Plugins, CPP, Blueprint, question\
**Created:** [March 28, 2017, 10:32pm UTC](https://forums.unrealengine.com/t/blueprint-functions-break-when-project-is-reloaded/389303 "2017-03-28T22:32:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b58cf9e8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b58cf9e8](https://forums.unrealengine.com/u/anonymous_user_b58cf9e8)\
**Post date:** [March 28, 2017, 10:32pm UTC](https://forums.unrealengine.com/t/blueprint-functions-break-when-project-is-reloaded/389303/1 "2017-03-28T22:32:56Z")

</div>

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!"));
}

```

---

<div class="post-metadata">

**Author:** ![BrUnO\_XaVIeR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bruno_xavier/32/1110230_2.png) [@BrUnO\_XaVIeR](https://forums.unrealengine.com/u/BrUnO_XaVIeR)\
**Post date:** [March 30, 2017, 11:47am UTC](https://forums.unrealengine.com/t/blueprint-functions-break-when-project-is-reloaded/389303/2 "2017-03-30T11:47:27Z")

</div>

Your issue doesn’t happen on my UE4 installation.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b58cf9e8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b58cf9e8](https://forums.unrealengine.com/u/anonymous_user_b58cf9e8)\
**Post date:** [March 30, 2017, 3:39pm UTC](https://forums.unrealengine.com/t/blueprint-functions-break-when-project-is-reloaded/389303/3 "2017-03-30T15:39:09Z")

</div>

Ya turns out that this was caused due to me messing with object CDOs as a workaround for [UE-42309](https://issues.unrealengine.com/issue/UE-42309).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b58cf9e8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b58cf9e8](https://forums.unrealengine.com/u/anonymous_user_b58cf9e8)\
**Post date:** [March 30, 2017, 3:45pm UTC](https://forums.unrealengine.com/t/blueprint-functions-break-when-project-is-reloaded/389303/4 "2017-03-30T15:45:08Z")

</div>

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](https://issues.unrealengine.com/issue/UE-42309). This will not occur on a fresh project.
