To implement your own behavior tree task, we simply subclass UBTTaskNode in code and write our own functionality. Sometimes we need our special instance memory (NodeMemory) if we are not instancing the node itself to store states. Looking at existing out of the box implementation, one can simply declare a struct like so:
struct MyTaskMemory
{
FAIRequestID RequestID;
uint8 bState0 : 1;
float MyFloat;
}
A function called GetInstanceMemorySize() will return the size of this structure for the base class to allocate memory for this. My question is, how can we initialize the values inside that structure if we want something other than the default? For example, the FAIRequestID defaults to 0, which is not the default if we were to call the default constructor for FAIRequestID (-1 is the default through constructor). I suspect the base class simply use memzero() to zero out all memory.