Define static variable won't launch a Standalone Game

  1. Create C ++ Project

  2. Create a C ++ actor class (AMyActor)

  3. Add static variable code to cpp

    static const UClass* TestCode = AMyActor::StaticClass();

  4. Build

  5. Play a standalone game

  6. Crash

Running it in the “editor window” works fine.

[link text][2]