# \_\_WorldContext pin appears and doesn't let to save my Blueprint

**URL:** <https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, editor, question, Blueprint\
**Created:** [March 2, 2015, 7:30pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760 "2015-03-02T19:30:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_ea72c43a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ea72c43a1](https://forums.unrealengine.com/u/anonymous_user_ea72c43a1)\
**Post date:** [March 2, 2015, 7:30pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/1 "2015-03-02T19:30:19Z")

</div>

I have a function CanTakeCover in my BlueprintFunctionLibrary, which contains a LineTraceByChannel function. When I refer to CanTakeCover, there appears a \_\_WorldContext input pin. I guess it’s because LineTraceByChannel needs a world context object and engine automatically creates this pin for me. I supply this \_\_WorldContext pin with what it wants and everything works, but once I re-open editor and try to save this functions library, engine says “can’t save MyLib.uasset …” (see picture).

If I delete CanTakeCover node from my graph, it saves. How to fix it?

 ![31832-trouble.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/0/b3054653735b7ecaa63b1b3a96c27d6a16b06fc4.png)

**Update** : I re-created this situation with an elementary function Foo with no input pins, but with only node LineTraceByChannel in its graph. If I put this function somewhere, re-open editor and try to save functions library - it won’t save.

---

<div class="post-metadata">

**Author:** ![devlyn811](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@devlyn811](https://forums.unrealengine.com/u/devlyn811)\
**Post date:** [March 3, 2015, 2:46am UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/2 "2015-03-03T02:46:26Z")

</div>

There may be some steps [here](https://answers.unrealengine.com/questions/80010/cant-save-blueprint-referenced-in-enginetransient.html) you can take that might help.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ea72c43a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ea72c43a1](https://forums.unrealengine.com/u/anonymous_user_ea72c43a1)\
**Post date:** [March 3, 2015, 7:17am UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/3 "2015-03-03T07:17:47Z")

</div>

It seems nothing listed in that topic helped me. But I found in external references a line

```
"BlueprintGeneratedClass /Engine/Transient.REINST_MyLib_C_119 (1)". 

```

MyLib is my functions library. It looks like library references itself.

Update: when I remove any invocation of function with \_\_WorldContext pin, reload editor - this line with circular reference disappears.

---

<div class="post-metadata">

**Author:** ![devlyn811](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@devlyn811](https://forums.unrealengine.com/u/devlyn811)\
**Post date:** [March 3, 2015, 2:05pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/4 "2015-03-03T14:05:05Z")

</div>

I think it’s a problem to try to use Blueprint library as a world context object, particularly if it’s calling itself. Blueprint library functions are static functions, so need a WCO if they need to work on world like a trace call.

Maybe try setting up calling function to take an actor and use it as WCO. Any actor should do, a blueprint library isn’t an actor, so that’s probably half problem, other half being its referring back to itself as WCO.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ea72c43a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ea72c43a1](https://forums.unrealengine.com/u/anonymous_user_ea72c43a1)\
**Post date:** [March 3, 2015, 3:19pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/5 "2015-03-03T15:19:33Z")

</div>

I’ve already tried it, setting function to take an actor as WCO. After compilation, \_\_WorldContext pin disappears, but Blueprint won’t save anyway.

I think it will not cure while I’m calling library functions inside same library, as you assumed it’s referring back to itself. So, perhaps, I have to implement my functions in an actor sub-class, or use C++ to avoid editors misbehaviour.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [March 3, 2015, 4:22pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/6 "2015-03-03T16:22:32Z")

</div>

Hi duburian,

This sounds like same issue reported here:

> **[4.7.1 Blueprint Function Library unable to save](https://forums.unrealengine.com/questions/180267/471-blueprint-function-library-unable-to-save.html)**
>
> \#Branch 4.7.1 Binary, as downloaded from launcher #Build Version: 4.7.1-2462028+++depot+UE4-Releases+4.7 #Description of Issue Cannot save Blueprint Function Library with any function that calls another function in same library. following...

Looks like a function in a Blueprint Function Library that references another function in that library cannot be saved after closing and reopening project. I’ve created a bug report as UE-11185 for this. If your Library function doesn’t refer to another function within itself, does this error cease to occur?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ea72c43a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ea72c43a1](https://forums.unrealengine.com/u/anonymous_user_ea72c43a1)\
**Post date:** [March 3, 2015, 4:33pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/7 "2015-03-03T16:33:43Z")

</div>

Hi ,

It depends on function I refer to. If it contains something that needs World Context Object, like raycast, it causes troubles. If I get rid of everything that needs WCO, I can refer to functions within same library without problem.

I decided to implement my functionality in a sub-class of Actor. It even makes sense in my case. So for me it’s not a problem any more.

Thank you for response!

---

<div class="post-metadata">

**Author:** ![devlyn811](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@devlyn811](https://forums.unrealengine.com/u/devlyn811)\
**Post date:** [March 3, 2015, 4:36pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/8 "2015-03-03T16:36:52Z")

</div>

I’ve had some difficulty moving from 4.6 to 4.7. I’ve moved a good deal of blueprint scripting to C++ and have noted a good increase in stability. Especially with structs. I was getting a lot of blueprint compiliation errors and dreaded ‘can’t save…’ error. Moving these types to C++ seems to have helped.

Good luck!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ea72c43a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ea72c43a1](https://forums.unrealengine.com/u/anonymous_user_ea72c43a1)\
**Post date:** [March 3, 2015, 6:00pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/9 "2015-03-03T18:00:16Z")

</div>

Blueprints are good and evil. I also suffered from them, but they come to help when you want to quickly check your idea. It incredibly decreases iteration times for me, since I have long compilation times on my laptop (f.e., entire engine compiles in 1.5 hour). But when idea is proven, it’s wise to move everything “blueprint” to C++.

Good luck! 😉

---

<div class="post-metadata">

**Author:** ![Lee\_Berger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lee\_Berger](https://forums.unrealengine.com/u/Lee_Berger)\
**Post date:** [May 21, 2015, 7:27pm UTC](https://forums.unrealengine.com/t/worldcontext-pin-appears-and-doesnt-let-to-save-my-blueprint/308760/10 "2015-05-21T19:27:44Z")

</div>

I’m pretty sure bug listed here is same as I just reported here:

[https://answers.unrealengine.com/questions/231716/blueprint-compile-error-could-not-find-a-pin-for-t.html](https://answers.unrealengine.com/questions/231716/blueprint-compile-error-could-not-find-a-pin-for-t.html)

There is a workaround in that bug report should you run into this issue in future.
