Currently I have a UPROPERTY in a C++ class as follows:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Citizen")
AActor* Bed;
This serves as a reference to this actor’s bed.
Then, in game, I set the dropdown list to the proper actor. This is fine for a while.
However, after a few compiles or a certain amount of time (I am unsure what triggers this) I get the following error:
IE:Error: Error Blueprint Runtime Error: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property?
If I simply hit “compile” in the offending blueprint, all is fixed (even though there was no change), but this is quite annoying if I have many blueprints that use this variable.
This tends to especially happen in blueprints relating to behavior trees (BTT, BTS, etc).
Is this an issue with HotReload/UE4 compiling? Or is there another way to get around this?
Here’s an image showing that the property is set despite the error: