Similar to this question, Can't save due to "Graph is linked to external private object" - C++ - Unreal Engine Forums, though this time it is a blueprint that can not be saved because of a empty C++ static function (or not empty, any static function will cause this bug). I’m a bit new to unreal engine c++ programming, so this might be a problem with my code, if so, please tell me.
The code used:
(header)
#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyBlueprintFunctionLibrary.generated.h"
/**
*
*/
UCLASS()
class TESTPROJECT_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category="NotWorking")
static void StartBug();
};
(cpp)
#include "TestProject.h"
#include "MyBlueprintFunctionLibrary.h"
void UMyBlueprintFunctionLibrary::StartBug()
{
UE_LOG(LogTemp, Warning, TEXT("Test:"));
}
Steps to reproduce:
- Create any static blueprint callable function, then compile.
- Make an empty actor blueprint and have it call this function, compile and save this blueprint (shouldn’t show an error at the moment).
- Make any change to the c++ function so that it will compile the code again (e.g. change
TEXT("Test:")
toTEXT("Test2:")
), then compile - Make any change to the blueprint containing the function so that will recompile or save, e.g. disconnect and reconnect a node, or just add a print string node.
- Attempt to save the blueprint, and the Engine/Transient error will come up (“Graph is linked to private object(s) in an external package, External Object(s): Engine/Transient” – OK → “The asset failed to save”).
I also tested it with an int as the return type, the bug is still there, only way I found to fix this is to delete and place the function again in the blueprint every single time you have to compile any part of any c++ code.
Anyone know a solution for this bug?