I’m currently learning how to use the UE4 c++ library with basic c++ knowledge.
The issue is that I have a Pawn class, wich I want it to call a function from another actorComponent but i get that message in UE4 editor :
LogUObjectGlobals:Warning: Class which was marked abstract was trying to be loaded. It will be nulled out on save. None ActorComponent
Obviously I should have use an actor class for it to work, but I would like to know if it’s still possible to do it with an actorComponent.
The peice of code basically looks like that.
UActorComponent* Weapongear = NewObject<UActorComponent>();
UWeaponSystem * const Weapon = Cast<UWeaponSystem>(Weapongear);
UE_LOG(LogTemp, Warning, TEXT(" Not Firing "));
UE_LOG(LogTemp, Warning, TEXT(" Firing "));
I would aslo like to know if theire is simpler ways to call function from another class and specifically actorcomponent functions.