# \[4.17.2\] World Context Invalid in Blueprint Function Library

**URL:** <https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048>\
**Category:** Blueprint\
**Tags:** macro-library, game-instance, unreal-engine, question\
**Created:** [September 8, 2017, 1:31am UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048 "2017-09-08T01:31:00Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![CyanBalloon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CyanBalloon](https://forums.unrealengine.com/u/CyanBalloon)\
**Post date:** [September 8, 2017, 1:31am UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/1 "2017-09-08T01:31:00Z")

</div>

Hi.

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [September 8, 2017, 12:20pm UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/2 "2017-09-08T12:20:06Z")

</div>

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?

 ![212771-worldcontext.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/6/d6653fbde4f2f03641dc0762aa4a8787806e9192.png)

---

<div class="post-metadata">

**Author:** ![CyanBalloon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CyanBalloon](https://forums.unrealengine.com/u/CyanBalloon)\
**Post date:** [September 8, 2017, 7:36pm UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/3 "2017-09-08T19:36:15Z")

</div>

**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?

---

<div class="post-metadata">

**Author:** ![CyanBalloon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CyanBalloon](https://forums.unrealengine.com/u/CyanBalloon)\
**Post date:** [September 8, 2017, 10:36pm UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/4 "2017-09-08T22:36:44Z")

</div>

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![Joshua\_NZ](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joshua_nz/32/918677_2.png) [@Joshua\_NZ](https://forums.unrealengine.com/u/Joshua_NZ)\
**Post date:** [September 10, 2017, 2:18am UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/5 "2017-09-10T02:18:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [September 11, 2017, 1:58pm UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/6 "2017-09-11T13:58:48Z")

</div>

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)](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.

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8bafcfec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8bafcfec](https://forums.unrealengine.com/u/anonymous_user_8bafcfec)\
**Post date:** [September 11, 2017, 6:44pm UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/7 "2017-09-11T18:44:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8bafcfec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8bafcfec](https://forums.unrealengine.com/u/anonymous_user_8bafcfec)\
**Post date:** [September 11, 2017, 7:03pm UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/8 "2017-09-11T19:03:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![CyanBalloon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CyanBalloon](https://forums.unrealengine.com/u/CyanBalloon)\
**Post date:** [September 11, 2017, 10:41pm UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/9 "2017-09-11T22:41:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e12a1674](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e12a1674](https://forums.unrealengine.com/u/anonymous_user_e12a1674)\
**Post date:** [September 13, 2017, 7:37am UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/10 "2017-09-13T07:37:53Z")

</div>

Why i get 404 page?? Help please!

---

<div class="post-metadata">

**Author:** ![Joshua\_NZ](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joshua_nz/32/918677_2.png) [@Joshua\_NZ](https://forums.unrealengine.com/u/Joshua_NZ)\
**Post date:** [September 14, 2017, 6:40am UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/11 "2017-09-14T06:40:42Z")

</div>

I can confirm that this commit fixes the issues.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [September 14, 2017, 12:56pm UTC](https://forums.unrealengine.com/t/4-17-2-world-context-invalid-in-blueprint-function-library/404048/12 "2017-09-14T12:56:33Z")

</div>

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.
