How to select editanywhere inworld actor in engine

i was unable to select editanywhere actor in engin

The correct definition is

public:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Gameplay”)

AActor* Target;

You can then find the property once you have placed your C++ based Actor/Blueprint within the level on the details panel within the Category as specified in the UPROPERTY macro.
The clause being it should be within the public section of the class else it won’t show up