# PCG at Runtime Issue

**URL:** <https://forums.unrealengine.com/t/pcg-at-runtime-issue/1231146>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, question\
**Created:** [July 17, 2023, 2:18am UTC](https://forums.unrealengine.com/t/pcg-at-runtime-issue/1231146 "2023-07-17T02:18:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gigglebooster00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gigglebooster00](https://forums.unrealengine.com/u/Gigglebooster00)\
**Post date:** [July 17, 2023, 2:18am UTC](https://forums.unrealengine.com/t/pcg-at-runtime-issue/1231146/1 "2023-07-17T02:18:01Z")

</div>

From my understanding I should be able to generate the PCG component at runtime but I can’t get it to work. I’m doing a simple example where I make a PCG graph that spawns a single point, and then a mesh on it. Then, I take a Blueprint, add the PCG component to the BP, and reference the PCG graph I just made. I set the PCG component setting to “generate on load” as well. Then, in the Blueprints event graph I make it so that key 8 does cleanup on the PCG component, and key 9 does generate. When I test this in game and hit 8 it will cleanup as expected so I know it’s accessing the component, but then when I hit 9 it will not generate. Am I missing something on this? Is there something else I need to do use generate in game?

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [July 26, 2023, 5:04am UTC](https://forums.unrealengine.com/t/pcg-at-runtime-issue/1231146/2 "2023-07-26T05:04:16Z")

</div>

Hey there @Gigglebooster00! Seems like some user’s figured out how to work with PCG at runtime in this thread:

> [@How to Affect the PCG in Runtime with Blueprint](https://forums.unrealengine.com/t/how-to-affect-the-pcg-in-runtime-with-blueprint/1146953):
>
> Hi, I am experimental the new PCG plugin in UE5.2 from the source build. I try to generate trees from the PCG graph and then create a door that will change the value of the blueprint variable which will be used in the PCG graph. I thought this will change the PCG value during the game. Although this is not working. Does anyone know where could be wrong? Here is the video of my code. [[How to Affect the PCG Content in Runtime with Blueprint] ](https://www.youtube.com/watch?v=1dLJkagnWFE) In this video, I create a PCG graph calle…

Let me know if this helps!
