Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[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.


Product Version: UE 4.17
more ▼

asked Sep 08 '17 at 01:31 AM in Bug Reports

avatar image

75 9 13 16

avatar image Doug E ♦♦ STAFF Sep 08 '17 at 12:20 PM

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?

alt text

worldcontext.png (96.0 kB)
avatar image CyanBalloon Sep 08 '17 at 07:36 PM

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?

avatar image CyanBalloon Sep 08 '17 at 10:36 PM

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.


avatar image Joshua_NZ Sep 10 '17 at 02:18 AM

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 Michael.Noland" may have caused it. He changed the way context works.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey CyanBalloon,

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here https://issues.unrealengine.com/issue/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.


Doug Wilson

more ▼

answered Sep 11 '17 at 01:58 PM

avatar image gelliott Sep 11 '17 at 06:44 PM

Already seems to be flagged as "Cannot Reproduce" :/

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.

avatar image gelliott Sep 11 '17 at 07:03 PM

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

avatar image CyanBalloon Sep 11 '17 at 10:41 PM

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

avatar image DiziART Sep 13 '17 at 07:37 AM

Why i get 404 page?? Help please!

avatar image Joshua_NZ Sep 14 '17 at 06:40 AM

I can confirm that this commit fixes the issues.

avatar image Doug E ♦♦ STAFF Sep 14 '17 at 12:56 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question