# Does PCG feature support in runtime mode?

**URL:** <https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [May 18, 2023, 7:29am UTC](https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527 "2023-05-18T07:29:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zefreestijl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zefreestijl](https://forums.unrealengine.com/u/zefreestijl)\
**Post date:** [May 18, 2023, 7:29am UTC](https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527/1 "2023-05-18T07:29:13Z")

</div>

Hi, I just start learning PCG,  
(have some experience in HE though)

I’ve searched the topic about it,  
only found these two threads that has a resolved answer,  
one says the PCG’s not available in runtime at the moment:

> [@Community Tutorial: Introduction to Procedural Generation plugin in UE5.2](https://forums.unrealengine.com/t/community-tutorial-introduction-to-procedural-generation-plugin-in-ue5-2/798574/86):
>
> We have not used any scripting language to create PCG graphs yet, but we plan to investigate that at some point to help us automate testing in some cases. Right now, I’m not sure that’s even possible without some tools on our end.

the other provides a walkaround to update the PCG graph in game:

> [@How to Affect the PCG in Runtime with Blueprint](https://forums.unrealengine.com/t/how-to-affect-the-pcg-in-runtime-with-blueprint/1146953/13):
>
> Hi, I finally find a way that to change the PCG content in the game. You do not need to use the set graph node to change between two graphs, right now, you can switch the static mesh in one PCG graph. Here is the door blueprint I have. In this image, you can see that I set up the “switch” variable, and this value will decide which static mesh it spawns in the PCG graph. Here is the PCG graph node. I use the “switch” property here to produce a new column to determine which static me…

I tried testing PCG in-game by adding a slider to control the random seed,  
it works in the PIE viewport, but doesn’t respond in an compiled exe program at all.

Anyone successfully ran the PCG in your games ?

Thanks in advance:]

---

<div class="post-metadata">

**Author:** ![AdrienLogut](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/adrienlogut/32/924340_2.png) [@AdrienLogut](https://forums.unrealengine.com/u/AdrienLogut)\
**Post date:** [June 1, 2023, 7:29pm UTC](https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527/2 "2023-06-01T19:29:24Z")

</div>

I don’t know how you interpreted my comment to “PCG doesn’t work at runtime”. It does work at runtime, but you can’t rely on editor callbacks.

If something change at runtime and you want to update your component, you need to call “Generate” with Force = true on the PCG Component in BP.

---

<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 15, 2023, 9:19am UTC](https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527/3 "2023-07-15T09:19:47Z")

</div>

Is anyone else not having luck with this? I tried making a BP and adding the PCG component to it. The PCG graph is simple it just takes a point and spawns a sphere mesh on it. I setup keyboard inputs in the BP so that 8 takes the PCG component and does Cleanup, and then 9 does Generate. I set the generation trigger to Generate on Demand. When I test this in game and hit 8, the pcg component will cleanup correctly, but then when I hit 9 it wont generate again. Am I missing something on the steps? Can’t seem to find a way to get it to generate in game, and I know that’s accessing the component correctly because cleanup is working. I have generate on demand checked in the BP not sure what else would be the issue.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/c/c4c21bd899ac00530f4f0a4796d3b7da1f29bd64.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/2/ba2387d1b5d5244236997096dfb6802f68c7e462.jpeg)

---

<div class="post-metadata">

**Author:** ![Bencsizy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bencsizy](https://forums.unrealengine.com/u/Bencsizy)\
**Post date:** [April 2, 2024, 8:51pm UTC](https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527/4 "2024-04-02T20:51:32Z")

</div>

Hi,

Ever figured it out? Having the same issue.

---

<div class="post-metadata">

**Author:** ![sinew28](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sinew28](https://forums.unrealengine.com/u/sinew28)\
**Post date:** [April 28, 2024, 2:55pm UTC](https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527/5 "2024-04-28T14:55:16Z")

</div>

Hi！

I encountered the same issue and it has been bothering me for nearly a week. I searched extensively on Google and YouTube but found no solution. Fortunately, I stumbled upon the problem’s cause unintentionally.

 ![88D589F8-4E3C-4214-9AC7-15E6E9168578](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/0/b30377b59bbc1607e1ac35eb97b6017de82cdefd.png)

It seems that the PCGComponent requires a BrushComponent to work at runtime. Strangely, it appears to function without a BrushComponent in the Editor. Additionally, the BrushComponent is not searchable under the “Add” menu. Consequently, my workaround was to use “Get Actor By Class” to obtain the PCGVolume and achieve the desired effect.

I hope this helps you out.

---

<div class="post-metadata">

**Author:** ![samuelthomson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samuelthomson](https://forums.unrealengine.com/u/samuelthomson)\
**Post date:** [September 13, 2024, 4:29pm UTC](https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527/6 "2024-09-13T16:29:59Z")

</div>

> [@sinew28](#):
>
> k at runtime. Strangely, it appears to function without a BrushComponent in the Editor. Addition

Can you please explain how you used “GetActorByClass”?

It seems very weird that something specific like a brush component would be needed.

---

<div class="post-metadata">

**Author:** ![Johnly](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Johnly](https://forums.unrealengine.com/u/Johnly)\
**Post date:** [January 22, 2025, 3:19am UTC](https://forums.unrealengine.com/t/does-pcg-feature-support-in-runtime-mode/1169527/7 "2025-01-22T03:19:01Z")

</div>

You can use a box component with collision and add it to the Actor so PCG can sample properly within the range And it can do it at runtime.
