Exposing C++ class members for Blueprint usage

I at first tried to create a Blueprint script from the Actor instance, but failed to figure out how to connect the position property to the sphere component.

What did you try for this? What do you mean by connecting the position property to the sphere component?

I have a C++ class inheriting an AActor class that will read a file or shared memory for a position coordinate. This coordinate will be stored in a FVector member, which I labeled with the UPROPERTY marco as such:

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SameLabel")

When I place the actor into the scene, I can see the FVector position data changing in the Editor - so far so good.

The next thing I want to do is use this position data to make something in the scene move. In the editor, I added a sphere static mesh component under my C++ Actor class, and I want this sphere to move based on said FVector. I at first tried to create a Blueprint script from the Actor instance, but failed to figure out how to connect the position property to the sphere component.

I glimpsed on others exposing C++ members to BP with other ways (Create another BP class that inherits the C++ class, use UComponent instead, Setters/Getters). What are some of the best ways I can have members of my C++ class usable in BP?

Using something such as SetRelativeLocation to set the sphere’s new position. When I try to add that function block, it gives me a warning about not having write permission over the Blueprint.

Well, I think I have this problem solved now.

I opened the Unreal project/editor all over again, and attempted to use “Blueprint/Add Script” to recreate a BP class that inherits my Actor class, and now I can add functions blocks in that BP class’s Event Graphs now. Perhaps it’s some kind of file permission glitch that messed me up back then.