ACharacter subclass in TSet: Cannot access private memberm

Its tested right before its called

I do not use new (they are blueprinted and generated by the ueditor) and no atm its not called, its an early idea und I dont think it will survive very much longer.^^

Well maybe your Master is nullptr ?

Master = (AStrategyPlayerController*)GetWorld()->GetFirstPlayerController();

That can return you a valid Pointer (but still wrong ;P) use this instead:

Master = Cast<AStrategyPlayerController>(GetWorld()->GetFirstPlayerController());

Also would be nice to know how you call your Custom Constructor here:

ABaseUnit::ABaseUnit(AStrategyPlayerController* Owner)

(please don´t tell me you use “new”

I only want to let you know that from now on I will hate you XD. Seems that it was a nullptr problem on the Master variable. I thought if you cast anything thats not castable it would return 0. I will investigate but it doesnt crash anymore (it doesn’t add the unit to the TSet but that leads (now) to Master is null)). Thank you very very much.

The controller is(should be) assigned but I will check that.

Aye thats because with (AStrategyPlayerController*) you simply say treat that thing as a StrategyPlayerController pointer even if its not :stuck_out_tongue_winking_eye: C++ basics

But check your GameMode and make sure you actually assigned the right Controller there. Should fix the problem.