When I play my project it pops up an error message saying that there was a compile error in one of my Blueprints, and there is a “BLUEPRINT COMPILE ERROR” red message at the top of the screen inside the game.
However, when I compile the BP in question, it compiles with no warnings or errors. The compile button never gives a green check and just keeps the orange question mark. I don’t know if there is really an error or not, but I can’t fix the issue if I don’t know what it even is.
The BP in question is a subclass of Actor and has two subclasses itself, one for the player and one for AIs trying to catch the player. I’ve recompiled every BP in my entire project and none of them show any errors.
Did you migrate this project from a previous engine version? If so this is expected behavior. Many changes typically occur to source code between engine versions and the blueprints affected need to be compiled to make sure they are up to date with the latest code changes. Unless something has changed dramatically (in which the error probably won’t go away), once you compile your blueprint it should be ready to go for the future.
Try creating new get references to your variables. There was an issue in 4.6.1 in which migrated references were causing odd compilation errors. Replace gets with new copies of the same variable and it may solve the compilation error.
Ok, I finally tracked down how to reproduce the issue. In my parent class I’m trying to cast self to one of the subclasses to see which type it is. It says it compiles fine in the BP, but causes the error elsewhere.
This is inside a function in the parent class BP_BaseDeck and BP_NewDeck is one of it’s subclasses.