# How to spawn actors from a Function Library?

**URL:** <https://forums.unrealengine.com/t/how-to-spawn-actors-from-a-function-library/2856067>\
**Category:** Blueprint\
**Tags:** spawn, object, unreal-engine, question\
**Created:** [November 15, 2026, 5:27am UTC](https://forums.unrealengine.com/t/how-to-spawn-actors-from-a-function-library/2856067 "2026-11-15T05:27:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AgentMic0604](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AgentMic0604](https://forums.unrealengine.com/u/AgentMic0604)\
**Post date:** [November 15, 2026, 5:27am UTC](https://forums.unrealengine.com/t/how-to-spawn-actors-from-a-function-library/2856067/1 "2026-11-15T05:27:33Z")

</div>

SpawnActorFromClass cannot be used at all within function libraries or object classes. Not only does it fail to appear in search results, but it is not even permitted to be placed. It cannot be used even when WorldContextObject is provided as an input.

Instead, there’s a strange function called SpawnActorForGameplayTask. It seems this is not a replacement for SpawnActorFromClass. Is there any way to make SpawnActorFromClass work on an object?

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [November 15, 2026, 5:53am UTC](https://forums.unrealengine.com/t/how-to-spawn-actors-from-a-function-library/2856067/2 "2026-11-15T05:53:33Z")

</div>

objects can be provided world context in c++

if you’re stuck in blueprint i’d make a spawn manager, or even just gamemode/gamestate, you can use interfaces if you dont want hard refs.

honestly this is a better plan anyway because you should track the spawned actors somewhere too

---

<div class="post-metadata">

**Author:** ![ImYourBeast](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/imyourbeast/32/1220194_2.png) [@ImYourBeast](https://forums.unrealengine.com/u/ImYourBeast)\
**Post date:** [November 15, 2026, 8:30am UTC](https://forums.unrealengine.com/t/how-to-spawn-actors-from-a-function-library/2856067/3 "2026-11-15T08:30:49Z")

</div>

that node is blocked in libraries on purpose since the backing spawn functions are marked internal only  
add your own spawn function on an actor with a world context pin and call that from the library  
pass the actor in and let it do the spawn so world context always resolves
