Referencing Variable from GameMode BP to Level BP

Hi everyone,

This is probably a simple thing but I can’t figure out how to fix it. When I run the game I get this error:

Error Accessed None ‘LevelTestRef’ from node Add in blueprint TestLevel

Here’s what I did:

  • In my gamemode blueprint (called “GameModeTest”), I’ve created an array variable (called “TestVarArray”) and set it to Editable
  • I’ve set “GameModeTest” as the default gamemode in the Project Settings
  • Following the [Direct Blueprint Communications][1] doc, in the Level blueprint I’ve created a variable (“LevelTestRef”) that has Variable Type of “GameModeTest”
  • I’ve created nodes to add to the array a random number and then print what’s inside the array
  • When I run the game I get the error (see above)

In the doc it says, “If your working Blueprint is the Level Blueprint, you specify the Blueprint instance you want to use in the Blueprint Editor, not in the Level Editor. By default, the Details panel in the Blueprint Editor is in the lower-left corner.”

I’ve looked for this but can’t find it.