Object reference property

In my Player Controller class I have a pointer to object (AVolume):

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Gameplay)
AVolume* BattlefieldVolume;

But in the Editor I can’t assign an object from my scene. I choose it in drop-down list or use “Pick Actor from scene”, but nothing happens. What am I doing wrong?

Controllers exist outside of specific levels, so you can’t assign actors inside a level to the default properties of a controller blueprint. The issue is that the same Controller can be used in multiple different levels, so it wouldn’t know how to refer to an actor from a different level.

A good way to deal with this is to set up a blueprint function on the controller to set that variable at runtime. Then, call that function from the level script blueprint with the appropriate actor reference. In the level script blueprint you can create a “begin play” event, call “GetPlayerController” to get the first player (or call it multiple times in a multiplayer game) and then assign the variable by calling that blueprint function.

Thank you!