# how to check compiling shaders finished by blueprint or c++

**URL:** <https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604>\
**Category:** Rendering\
**Tags:** engine-compile, unreal-engine, shader, question, compile-editor, compilation-log\
**Created:** [November 17, 2020, 6:19am UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604 "2020-11-17T06:19:13Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinozaki\_ss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shinozaki\_ss](https://forums.unrealengine.com/u/shinozaki_ss)\
**Post date:** [November 17, 2020, 6:19am UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/1 "2020-11-17T06:19:13Z")

</div>

ues Editor Utility Widget  
When importing the model, the compiler always compiles the shaders automatically. Can I get a certain return value after the completion of the compilation of the shaders, which is convenient for me to continue the follow-up work

so,how to check compiling shaders finished by blueprint or c++?

thanks

---

<div class="post-metadata">

**Author:** ![unrealsumon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unrealsumon](https://forums.unrealengine.com/u/unrealsumon)\
**Post date:** [December 23, 2020, 4:05am UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/2 "2020-12-23T04:05:42Z")

</div>

You can get that using c++. There are couple of functions available. such as

```
GShaderCompilingManager->FinishAllCompilation();
GShaderCompilingManager->IsCompiling()    

```

There are more useful functions you can get from that class.  
And you have to include

```
#include "ShaderCompiler.h"

```

Thanks.

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [March 7, 2021, 9:05pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/3 "2021-03-07T21:05:17Z")

</div>

Can confirm this still works in 4.26.1 - Thanks for the tip!

---

<div class="post-metadata">

**Author:** ![monodrobe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monodrobe](https://forums.unrealengine.com/u/monodrobe)\
**Post date:** [June 29, 2023, 6:49pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/4 "2023-06-29T18:49:26Z")

</div>

Set this up for my project. Works fine / perfect in editor, standalone and launch game.  
But in the packaged build it crashes. Any ideas / help much appreciated.

for clarity heres my function

UFUNCTION(BlueprintCallable, Category = “Shaders”)  
static bool IsShadersCompiling();

bool UCPPFunctions::IsShadersCompiling() {  
return GShaderCompilingManager-\>IsCompiling();  
}

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [June 29, 2023, 6:56pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/5 "2023-06-29T18:56:17Z")

</div>

> [@monodrobe](#):
>
> But in the packaged build it crashes

Maybe try instead:

```auto
FAssetCompilingManager::Get().FinishAllCompilation();

```

---

<div class="post-metadata">

**Author:** ![monodrobe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monodrobe](https://forums.unrealengine.com/u/monodrobe)\
**Post date:** [June 29, 2023, 7:49pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/6 "2023-06-29T19:49:07Z")

</div>

not sure i follow. the whole fasset part. Im pretty decent at C++ but occaisionally stuff like this make me realize i dont know jack.

The GShaderCompile bit makes sense to me as its the reference in the shaderComile.h to the class with the function.

I tried using GetNumRemainingJobs, since isCompiling returns an or statement 4 different elements, where as num jobs only does 2. but it crashed too

Are you saying its something to do with the → ( pointer right ? )

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [June 29, 2023, 8:06pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/7 "2023-06-29T20:06:09Z")

</div>

FAssetCompilingManager is a layer above the GShaderCompilerManager (has a list of IAssetCompilingManager - which is what FShaderCompilingManager is derived from).

I was thinking it may be that GShaderCompilingManager is a nullptr?

Using FAssetCompilingManager will hopefully have that list of managers mantained in a shipping build.

---

<div class="post-metadata">

**Author:** ![monodrobe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monodrobe](https://forums.unrealengine.com/u/monodrobe)\
**Post date:** [June 29, 2023, 8:32pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/8 "2023-06-29T20:32:38Z")

</div>

more or less follow. I see the connection from gshader to fshader but wasnt able to find the fassetcompilingmanager to go digging through it

Oddly enough if i just locally save isCompiling to a bool it runs. but if i try to use that bool as the output back to crashing… on second thought i wonder if it just didnt compile or something… more testing to verify

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [June 29, 2023, 8:38pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/9 "2023-06-29T20:38:28Z")

</div>

maybe make the method non-static (just remove the static before the bool in the header)?

---

<div class="post-metadata">

**Author:** ![monodrobe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monodrobe](https://forums.unrealengine.com/u/monodrobe)\
**Post date:** [June 29, 2023, 8:42pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/10 "2023-06-29T20:42:41Z")

</div>

hmmm, good catch. I copy paste my headers all the time making new functions. Bad habit. and a static setting when not needed has bit me on the ■■■ before

testing

---

<div class="post-metadata">

**Author:** ![monodrobe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monodrobe](https://forums.unrealengine.com/u/monodrobe)\
**Post date:** [June 29, 2023, 8:54pm UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/11 "2023-06-29T20:54:39Z")

</div>

fingers crossed, but nope still crashed

Thanks for trying to help out. Gotta shift gears now. Lost too much time to this today and now gotta refactor this out of the code… boooo.

Was stoked when i came across this as I was looking for something like this for awhile now. One of my problems to solve is rendering out icons, and not being able to tell if they re ready to have their picture taken. This wasnt perfect, but it was way better then a hardcoded delay

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [March 20, 2025, 5:58am UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/12 "2025-03-20T05:58:48Z")

</div>

Do you Know if something similar exist for the PSO?

I’m using this delegate to Know what Asset is compiling  
`FAssetCompilingManager::Get().OnAssetPostCompileEvent();`

It does work… But it does not trigger it when PSO is compiling

Thank you! so much!!

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [March 20, 2025, 7:05am UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/13 "2025-03-20T07:05:20Z")

</div>

There’s

```auto
FShaderPipelineCache::NumPrecompilesRemaining()

```

Tom Looman has some good info here:

> **[Setting up PSO Precaching & Bundled PSOs for Unreal Engine](https://www.tomlooman.com/psocaching-unreal-engine/)**
>
> Unreal Engine titles have faced stutter issues on PC with DirectX 12. These hitches primarily stem from inefficient handling of Pipeline State Objects (PSOs), which preconfigure GPU states but suffer from on-demand compilation delays. Unreal Engine...

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [March 20, 2025, 7:53am UTC](https://forums.unrealengine.com/t/how-to-check-compiling-shaders-finished-by-blueprint-or-c/474604/14 "2025-03-20T07:53:31Z")

</div>

Thank you so much @RecourseDesign ❤
