@uced, You can access your blueprint variables from C++ (link)
Alternatively, you can code up your marker emitter within C++ itself, if you don’t want C++ to blueprint communications.
You would derive from UDungeonMarkerEmitter
MyDungeonEmitter.h
class UMyDungeonEmitter : public UDungeonMarkerEmitter
{
GENERATED_BODY()
public:
virtual void EmitMarkers_Implementation(UDungeonBuilder* Builder, UDungeonModel* Model, UDungeonConfig* Config, UDungeonQuery* Query) override;
};
MyDungeonEmitter.cpp
#include "DA413X.h" // pch
#include "MyDungeonEmitter.h"
void UMyDungeonEmitter::EmitMarkers_Implementation(UDungeonBuilder* Builder, UDungeonModel* Model, UDungeonConfig* Config, UDungeonQuery* Query)
{
// your logic
// Emit markers like this
FTransform transform;
Builder->EmitMarker("MyMarkerName", transform);
}
This way your code class is statically types and you can reference and set the variables of this class from your code while adding the emitter to the dungeon actor
// create an object from this BP class
UMyDungeonEmitter* DAEmptySpaceEmitter = NewObject<UMyDungeonEmitter>(this);
// if ok, use it
if (DAEmptySpaceEmitter)
{
MarkerEmitters.Add(DAEmptySpaceEmitter);
DAEmptySpaceEmitter->MyAttribute = MyValue; // directly reference and set anything you like
}