I’m trying to setup a simple AI implemented in C++, and after not being able to make it do anything I added some functions to print out messages in the AI’s tick function to see if anything is working. But neither my UE_LOG or AddOnScreenDebugMessage function ever gets called, even though I have bCanEverTick and bStartWithTickEnabled set to true. Everything compiles without errors.
I placed the AI in my level but nothing gets written to the output log nor printed on the screen. I tried putting those statements inside of the constructor and on the BeginPlay() function as well, but nothing happened. ABaseAI derives from another of my own classes, ABaseCharacter which derives from the default ACharacter. The AI uses my own simple controller, but none of its functions ever seem to get called either.
Does the ABaseCharacter Tick() function print properly or do you have the same behavior if you add the same code to it? I tried to match your setup with ACharacter->ABaseCharacter->ANewChar as my class hierarchy setup but my on screen debug message printed as expected each frame.
If possible could you post your project or a sample project with this issue for me to test directly? For privacy concerns you can upload your project and then send me a PM on the forums with a link to download the project.
Thank you for the reply, adding the print statements to ABAseCharacter’s Tick method did not work either. However, I created a blank project and extended ACharacter, the tick function in the new project worked as expected.
I went back to my project and got a bunch of unresolved external symbol compile errors (LNK2001) in ABaseCharacter and the controller. I’ve got them for overridden functions like Possess() and for all of my own. I don’t understand why VS is having linking issues though, all of my functions are defined in the header file and included.