How to create two separate objects(actors) using one C++ file

I want to create two separate objects(actors) using the one C++ file , how can i do that ??

Thanks

You can create 2 separate Actors by spawning them both in the same .cpp using the methods provided here.

Note that your question is to vague (or general) to dive into specifics…

If I read this question correctly my answer would be:

Create a .cpp that will expose all needed variables to Instances UPROPERTY(EditInstanceOnly, …)

Then in the editor you create a blueprint that inherits from your newly created .cpp class.

now each time you drag and drop the new blueprint you create a new instance of it that let you set the vars specifically for each instance.

Thanks the quick replay @dZh0 i need to create this hierarchy,

252045-h.png

while i import the geometry (While dragging the c++ file from contain browser to editor). I want to achieve this hierarchy using C++ class.

(Can i do that and if i can then can i make actor inside actor instead DatasmithSceneActor into actor)

How can i do that ?? (Can you please give an example code like where to use method and how to use it)

Thanks in advance.