Hi,
I have an UObject that constructed like this,
SDK.h
#pragma once
#include "SDK.generated.h"
UCLASS(Blueprintable, BlueprintType)
class BLANK_API UNGSDK : public UObject
{
GENERATED_BODY()
public:
UNGSDK();
UPROPERTY(BlueprintReadWrite, Category = "NGSDK")
bool Initialized;
UFUNCTION(BlueprintCallable, Category = "NGSDK")
FString SayHello();
UFUNCTION(BlueprintCallable, Category = "NGSDK")
bool IsInitialized();
UFUNCTION(BlueprintCallable, Category = "NGSDK")
FString SayBruh();
};
SDK.cpp
#include "SDK.h"
UNGSDK::UNGSDK()
{
Initialized = true;
}
FString UNGSDK::SayHello() {
UE_LOG(LogTemp, Warning, TEXT("Message from plugin"));
return "Hello";
}
bool UNGSDK::IsInitialized() {
UE_LOG(LogTemp, Warning, TEXT("Message from plugin"));
return Initialized;
}
FString UNGSDK::SayBruh() {
UE_LOG(LogTemp, Warning, TEXT("Bruuuh"));
return "Bruh";
}
The Blueprint:
These code and the blueprint work perfectly in Play mode (in editor), the Print node in the upper right is always returning true. But when I try to launch it outside the editor, it failed to recognize the reference that connected by the blue line, it always returning false in the Print node.
Why does it behave like that?
Thank you.