Variable for actor palced in world

I have an an Aim class which inherit form Actor class. I placed this actor in the world and i whish to have acces to it in my c++ code. So i wanna create a variable where may i drag and drop it from world.

Not working:

   UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Mesh)
        	AActor* Aim;

I can choose object in editor but it’s not assigning it and just makeing a none value

  UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Mesh)
        	Aim* Aim;
   UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Mesh)
        	AActor<Class Aim>* Aim;

Code is not compiling.

Your question kind of confused, not sure what you want to do here. Can you explain more clearly ? Like i don’t understand about create a variable and drop in the world, you can only create a blueprint then you can drop in the world, and blueprint is a class not a variable.

Yea i forgotten to add that i wanna have acces from other class.
So from other class i am making variable to storage the object of other class which is placed in a world. And i whish to be able to drag and drop an object FROM a scene to that variable.

Oh, so blueprint from Aim class is a class, what you want to set is an instance of Aim class, do this

UPROPERTY(EditDefaultsOnly, Category = Mesh)
TSubclassOf<class Aim> AimClass

this will let u set a blueprint of aim class, and to use u need to spawn this class and set to Aim variable

Aim* AimActor = GetWorld()->SpawnActor<Aim>(AimClass);

Yeap it worked thank you. But still its spawning an actor via script, is it possible to having a variable which stores reference to instance of a Aim class ? (Yep it is but u have to search in getworld(), i wish to drag and drop :P?)

Aim* AimActor is reference to instance of Aim class, the only way you can drop instance to this is that instance already in Level.

If you wrote something like that:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship")
AActor * SomeActor;

Then in editor you will see Field “SomeActor” in which you can “place” any object that was driven from AActor.
But you must understand that you can`t place there an object from content browser. Because all you can see in content browser did not exist in level, it is only Classes. But if you place something from content browser to you level, unreal will construct an object for you class (in most cases it will be driven from Actor). Then you can select you Actor (that already exists in level) in field “SomeActor”