Cannot call a function from another class! No errors UE4 just closes itself

I just tried to intilialize AEnemyActor in the header file and compiled it. Ue crashed and now every time I try to open the project its just crashes and gives me same error message xD I am at the end with my nerves. I dont know what can I do. :confused:

Haha, dont worry. This should do the trick:

Go to your game project folder and open the Aeon.sln with visual studio. Undo the changes in your header file and rebuild the project. Starting your project should work fine afterwards.

Also remember: never put initializations into header files. You should not even think about using global variables (even if UE does)

The reason it crashes is bcoz u are creating an actor on the stack and Unreal doesnt let you do that ( it garbage collects any actor created, meaning it tries to delete from the local stack, causing the crash )
To refer to an actor in the world, use an actorIterator or if you want to spawn an actor use SpawnActor

  1. Dont create the actor from the stack, get the reference to it from the world using an actorIterator,