Download

Best way to access variables of a pre-defined building type (blueprint)?

Hello everyone,

Currently, I’m working on a little project in which the user can define two points and the engine will fill in those two points with buildings. This will all be done in the constructor and so needs to access the bounds of each different building type - these are variables I’ve created myself to fit my design.

Basically, I store each pre-defined building in an array of “baseStructure” classes inside of a datatable, the street object then loops through each one and finds the best building for the situation at hand - but there is only one problem, I am unable to access the bounds of each building because it is a class, not an actor (instance). I have tried using the Get All Actors Of Class node but it only returns an array of zero length and so cannot access it that way.

Does anyone have any suggestions for how I might access variables from a static class, or even get the base actor object stored within the blueprint?

Thanks,
Joe

Get All Actors of Class returns all actors in the world. I would use a Struct with a mesh member and a bounds member.