Referencing Level Blueprint Variables prevents saving?

Hello Staff,

I’ve run into a roadblock and would love your advice.

  • I have created some variables in the Level Blueprint
  • I need to access these Level Blueprint variables from within the MyCharacter Blueprint
  • As you can see in the first two screenshots, the method I use accomplishes my goal
  • Everything compiles without errors or warnings and runs perfectly
  • Unfortunately, when I attempt to save these changes, I receive an error preventing me from saving my changes (see screenshots three and four)
  • This has not been a problem when using this same method of accessing variables across blueprints when not involving the Level Blueprint
  • It appears that using C++ to implement this method would not have this particular problem

In conclusion, it feels like these save error messages are intended… but if the game compiles with no errors, and everything works at runtime, why would I not be allowed to save these changes? This is a strange exception to the rule.

25526-ue4_blueprint_save_error1.png

For default game variables, save them in your Default Game Mode, particularly if you are using a asset in multiple levels. The problem is that the variables you are trying to reference do not exist in the current context because the map that houses those variables is not loaded. The Default Game Mode class, however, stays constant even between levels unless you explicitly change it. You would have this same problem with C++, because the problem is that they don’t exist.

Cheers,
Tony