Why unreal engine crashes when i initialize a pointer in the .h class file (img1), but it doesn’t crash when i initialize it into .cpp file, inside the BeginPlay function (img2). Have you any idea about it?. it’s happened with too many others pointers…
From the UE Course ( Unreal Engine C++ Developer: Learn C++ and Make Video Games) (video 122 - FindComponentByClass), i’m simply trying to create the pointer, just like the video shows, using FindComponentByClass function.
If i create the pointer to Nullptr into .h file (like img1 shows), unreal Crashes, but if i just create the pointer into .cpp file (like img2 shows), the editor doesn’t crash.
Effectively it was a bug, i tried to delete both Binaries and Intermediate folders and it worked! (before i only deleted the Binaries folder). Thanks a lot, have a great week!