tl;tr: How can i get varibles/arrays from the WorldGen/Blueprints in my BTService
I have a WorldGen that generates a world based on “blocks”, like siedler of catan. All blocks are stored in the array “WorldInfo”.
The WorldGenerator is made by my friend and he is not able to use C++. I want to write the AI in C++ and used the following guide: YOUTBE to start
Now im at the point where i am in the BTService and want to find the block where I’m on and want to iterate through the “WorldInfo” array to find the closest ressource block.
No I don’t think you’re missing anything. Defining the parent in C++ and having Blueprints inherit from this class is what I do whenever it is possible. Although, to be fair, quite a bit of the code in the example deals with setting values, which is worse than just getting values out of Blueprints. But still, while the reflection system is great to have, code using it is a lot more verbose and more difficult to debug than the straightforward solution, so, to repeat myself, in my projects I always define the basic structure of types in C++ and then use Blueprints to customize them.