Get location of a component from class

Hi everyone

I add a component in my class,and I need to spawn some instances according to this component’s default relative location so these instances won’t collide each other.

I know I can spawn them first and then move them or store the location in a var but this two ways seem a bit silly.Is there a way to get the location directly from the class?


What do you want exactly? im not sure i understod…

For me seems you overcomplicate a thing… You try to spawn components around a class which is exist in the world and have a special component?

Can you clarify a little bit more?

Thanks for replying
I want to spawn some actors from a class.But the location of those actors are detemined by the relative location of two component in the class.
Actually I’m spawning road:the class is the base class of road pieces,the components are taging the start and end of the piece;there are no static meshes in the base class because in the subclasses there may be several meshes and some space between them

Well you can add vector variable as default variable and set them where you want…
and try to get class defaults.

or go to c++ and use deferred spawn