[4.17.2] World Context Invalid in Blueprint Function Library


I’ve just converted my project from 4.15 and I’ve got a somewhat annoying problem. As the title says, I can’t access any Gameplay Statics (game instance, character players, etc.) from global functions. It returns null every time. It returns null on other occasions too, basically every time the “World Context Object” node appears, the instances will return null.

A workaround is to use macro libraries instead, but the changes would take a great amount of time. I’d like to know if it’s really a bug, and will be fixed, or it’s intended.


Hey CyanBalloon,

What mode are you in when the World Context node returns null? Using the setup in the screenshot below, I noticed my “Is Not Valid” branch being triggered only in a standalone game. PIE and a packaged game both produced the result from the Is Valid branch. Can you confirm if this is the same behavior you’re having?

EDIT: Re-compiling the blueprint fixed the problem. Is there a way to tell the engine to recompile all blueprints? Will packaging re-compile all the blueprints?

Alright, I’ve messed around more with the problem, and re-compiling does not always fix the problem. The behavior is absolutely erratic. Here are the multiple findings I have at the moment.

  1. Most of the time, anything in a Blueprint Function Library that has the “World Context Object” node fails and returns null in PIE.
  2. Re-compiling an animation blueprint that calls a function from a Blueprint Function Library fixes the problem everytime
  3. Re-compiling the Blueprint Function Library does not fix the problem.
  4. After re-compiling/testing some specific actors, the problem fixed itself, the reason is unknown.
  5. I thought this was a conversion problem from 4.15 to 4.17, but I created an empty project reproducing the same calls, converted it, and there is no problem.
  6. Calling GetGameInstance from an Actor Macro Library works fine, and so does calling it directly in the blueprint.
  7. The same problems occur with Actor Components.
  8. Creating a new Blueprint Function Library and accessing the Gameplay Statics works fine. Only the old ones from 4.15 returns null.

That pretty much sums it up. I started to refactor some of the project’s code, but quickly realized that a refactor is not a viable solution, it would take me weeks to refactor everything as I relied heavily on Blueprint Function Library for tools like finding specific actors, accessing GameplayStatics, Save instances, managing widget creation, etc.

We’re going back to 4.15. I would appreciate any help as there are features in 4.16 and 4.17 alike that we’d love to have.


I am also getting this issue since moving to 4.17 from 4.16. I use a simple library to get a volume value from the game instance. It’s a bit hit and miss, some classes calling it works & some return the context null error.

It appears that “Change 3499420 by .Noland” may have caused it. He changed the way context works.

Hey CyanBalloon,

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here Unreal Engine Issues and Bug Tracker (UE-49567) . You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.


1 Like

Already seems to be flagged as “Cannot Reproduce” :confused:

I have a project that I upgraded to 4.17 from 4.16 this morning and anything with a World context reference inside a function library returns none. Yay. Recompiling didn’t seem to help.

I’ll play around with it a bit see if i can get ti to work but I’ll probably stick to 4.16 (which in itself is annoying as there are bugs in that that are fixed in 4.17). But right now the 4.16 bugs are not breaking the game.

Though maybe it was already fixed in a previous bug for 17.2 https://github.com/EpicGames/UnrealEngine/commit/ca19a3d62278cdcf6f1a5bcde1b965983cb0f3dc

This commit definitely seems like if could be the fix we need. I guess we’ll have to see in 4.17.2.

Why i get 404 page?? Help please!

I can confirm that this commit fixes the issues.

Hey everyone,

The linked report was marked as cannot reproduce because it has already been fixed for 4.17.2 as you have already discovered.


You need to be logged into GitHub and need to have linked your Unreal Engine and GitHub accounts to be able to access the page gelliott linked.