# Function doesnt work until i compile, when i start Editor

**URL:** <https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263>\
**Category:** Blueprint\
**Tags:** unreal-engine, editor, Blueprint, question, function-signature, compile-editor\
**Created:** [July 16, 2020, 5:17pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263 "2020-07-16T17:17:31Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![SakiGGs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SakiGGs](https://forums.unrealengine.com/u/SakiGGs)\
**Post date:** [July 16, 2020, 5:17pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/1 "2020-07-16T17:17:31Z")

</div>

![307430-picture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/0/d90388abf7c22a8fc67f42e397d2d61af65e851e.png)

I have made function that adds items i pick up to my inventory. When i start Editor it doesnt work, i have to compile Blueprint that holds that function. So it goes like this. I start Editor, pick up doesnt work. I compile SAVE my blueprint. It works. I Turn off editor and turn it on again. doesnt work, until i compile that blueprint again.

Edit: it print no space before compile, after compile it print has space.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 16, 2020, 6:02pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/2 "2020-07-16T18:02:51Z")

</div>

Can’t say why (structs can act up in a similar fashion at times) but I’d just redo this function.

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [July 16, 2020, 6:07pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/3 "2020-07-16T18:07:30Z")

</div>

I have a similar issue sometimes. When I open a level, nothing in the Level BP works, including trigger overlap events and whatnot. After compiling the level BP everything starts working. It happens seemingly at random and I have no idea why it happens.

---

<div class="post-metadata">

**Author:** ![Marcis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/marcis/32/1103070_2.png) [@Marcis](https://forums.unrealengine.com/u/Marcis)\
**Post date:** [July 17, 2020, 3:17am UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/4 "2020-07-17T03:17:48Z")

</div>

This is one of the reasons why I dread using structs. Every time I make changes to a struct the same would happen to me. It was so bad at one time I even made a utility widget that would load all the blueprints that reference the struct, refresh all nodes in it, compile and save.

---

<div class="post-metadata">

**Author:** ![SakiGGs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SakiGGs](https://forums.unrealengine.com/u/SakiGGs)\
**Post date:** [July 17, 2020, 3:51pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/5 "2020-07-17T15:51:13Z")

</div>

By redo you mean, creating new function with the same exact nodes? And hoping this time it will work?

---

<div class="post-metadata">

**Author:** ![SakiGGs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SakiGGs](https://forums.unrealengine.com/u/SakiGGs)\
**Post date:** [July 17, 2020, 3:52pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/6 "2020-07-17T15:52:13Z")

</div>

Can you tell me more in detail how that works?

---

<div class="post-metadata">

**Author:** ![SakiGGs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SakiGGs](https://forums.unrealengine.com/u/SakiGGs)\
**Post date:** [July 17, 2020, 3:52pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/7 "2020-07-17T15:52:32Z")

</div>

Or just straight up show example ? So i can copy it

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 17, 2020, 4:18pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/8 "2020-07-17T16:18:40Z")

</div>

Yes, unless you’re using structs - are you? When you open the project, are you seeing any warnings / errors in the log?

---

<div class="post-metadata">

**Author:** ![SakiGGs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SakiGGs](https://forums.unrealengine.com/u/SakiGGs)\
**Post date:** [July 17, 2020, 5:02pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/9 "2020-07-17T17:02:51Z")

</div>

No errors, By Struct, you mean “Blueprint structure”, if yes, im using them and they are being used in this function. Should i really avoid using them? Try to make this invetory system without them?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 17, 2020, 5:12pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/10 "2020-07-17T17:12:53Z")

</div>

Yup, I meant the struct - blueprints structure. Now, since you’re desperate, consider the following:

- make a copy of your project and open it
- open the struct that that very function is using
- add any variable to the struct
- save the struct
- shut down the editor
- **ignore any & all other prompts to save or compile - cancel / ignore all**
- open the project and see how things are

* * *

Also, apologies for asking about structs; I now see clearly there is an attached image and you’re clearly using them. Not entirely sure how I missed that…

---

<div class="post-metadata">

**Author:** ![Marcis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/marcis/32/1103070_2.png) [@Marcis](https://forums.unrealengine.com/u/Marcis)\
**Post date:** [July 17, 2020, 5:36pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/11 "2020-07-17T17:36:11Z")

</div>

Manually paste the path to the asset. I added delay just in case.

> **[Struct fix EUW V2 posted by anonymous | blueprintUE | PasteBin For Unreal...](https://blueprintue.com/blueprint/o120zm70/)**
>
> No description provided

Oh and this will only work in Editor Utility Widget

To get the correct path right click on your struct in content browser and select “Copy Reference”. Then paste it in the node.

---

<div class="post-metadata">

**Author:** ![SakiGGs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SakiGGs](https://forums.unrealengine.com/u/SakiGGs)\
**Post date:** [July 18, 2020, 3:57pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/12 "2020-07-18T15:57:24Z")

</div>

That didnt help ☹ . I created new project. Just to try to make this inventory. And it happened again. and pretty early stage too. Works after compile, but fresh editor start or Standalone play doesnt work. I feel like i must be doing something wrong, because it bugs out so consitently. One would think that such bug would be fixed by now.

---

<div class="post-metadata">

**Author:** ![SakiGGs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SakiGGs](https://forums.unrealengine.com/u/SakiGGs)\
**Post date:** [July 18, 2020, 8:30pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/13 "2020-07-18T20:30:28Z")

</div>

> **[Evercraze.zip](https://drive.google.com/file/d/1IUO2q7eFGAGHMVxTojWA4berc3JyfW0D/view?usp=sharing)**
>
> Google Drive file.

Blank project with this inventory, made up until it stopped working. If anybody can tell me, workaround that works with this. or tell me what im doing wrong. ill be grateful. E to pick up, tab to open inventory.

---

<div class="post-metadata">

**Author:** ![nuklerist](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nuklerist/32/1194598_2.png) [@nuklerist](https://forums.unrealengine.com/u/nuklerist)\
**Post date:** [December 29, 2024, 12:52pm UTC](https://forums.unrealengine.com/t/function-doesnt-work-until-i-compile-when-i-start-editor/468263/14 "2024-12-29T12:52:25Z")

</div>

After 4 years, this problem still exists. My function library wont run on project load, until i open and compile it. It’s a really terrible problem because the engine doesn’t even tell you that the problem is there. You have to find it by compiling one by one. Hundreds of blueprints if your project is big.

Edit: I fixed it. Engine says where is the problem in output log. Open the “Output Log” window and filter warning and errors when you load the project. It will say some structures are broken at some adress. Go to that adress, delete the structure variable(or it may be a function output) and create a new one.
