# test spawn actor in UActorComponent::BeginFrame 

**URL:** <https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [December 9, 2025, 8:08am UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060 "2025-12-09T08:08:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [December 9, 2025, 8:08am UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/1 "2025-12-09T08:08:27Z")

</div>

Basic question, from a subclass of UActorComponent::BeginPlay is there a way to know if we are on a spawned AActor (versus a level actor)?

The only (non efficient) solutionI see is to combine a UWorld::AddOnActorSpawnedHandler to detect the spawned actor, search for my embedded component.

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![john.yatco](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@john.yatco](https://forums.unrealengine.com/u/john.yatco)\
**Post date:** [December 9, 2025, 4:19pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/2 "2025-12-09T16:19:45Z")

</div>

Hi,

Here’s a couple of additional approaches:

1.) [UActorComponent::OnComponentCreated](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/AActor) (When an actor is spawned in the editor or during gameplay, this gets called for any native components. For blueprint-created components, this gets called during construction for that component. This is not called for components loaded from a level.)- You could override that function in your subclass and flag the component when it’s called

2.) You could add a Tag to the Actor when it’s spawned and look for the tag with ActorHasTag

Please let me know if one of these works for you!

Regards

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [December 17, 2025, 4:45pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/3 "2025-12-17T16:45:35Z")

</div>

I’ve built a small project (attached) with a very small plugin containing a native subclass of AActorComponent to validate your solution.

The component UnrReplicationComponentAbstract overrides UActorComponent::OnComponentCreated and prints a log trace.

I’ve used this component in a BP actor called BP\_MovingActor and placed some actors in the map.

I’ve enabled and set up World Partition to enable streaming.

In PIE, when I move far away and then come back close, I see that OnComponentCreated is called, which should not be the case in my understanding. Could you have a look at the project and clarify what is going wrong or what I’m misunderstanding?

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [December 17, 2025, 5:10pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/4 "2025-12-17T17:10:45Z")

</div>

I’ve updated the project with a press on the space bat that swan the same actor. It allows to compare the behavior between the spawn and level actor. You can download it here : [TestReplication.zip - share.corys.fr](https://share.corys.fr/index.php/s/ceHJrGXRS4kDXfG)

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [December 19, 2025, 3:01pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/5 "2025-12-19T15:01:25Z")

</div>

AActor::IsNetStartupActor() seems to do the job. Thanks to point be some good threads.

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![john.yatco](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@john.yatco](https://forums.unrealengine.com/u/john.yatco)\
**Post date:** [December 12, 2025, 8:35pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/6 "2025-12-12T20:35:35Z")

</div>

Hi,

I wanted to check-in to see if the above information helped out.

Please let me know, thank you!

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [December 15, 2025, 12:19pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/7 "2025-12-15T12:19:54Z")

</div>

Sounds good but need a final test. Design phase =\> will be tested “soon”. I’ll keep you in touch here.

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![john.yatco](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@john.yatco](https://forums.unrealengine.com/u/john.yatco)\
**Post date:** [December 15, 2025, 7:32pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/8 "2025-12-15T19:32:33Z")

</div>

Sounds good, please keep me updated after the test, thank you!

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![john.yatco](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@john.yatco](https://forums.unrealengine.com/u/john.yatco)\
**Post date:** [December 18, 2025, 9:09pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/9 "2025-12-18T21:09:35Z")

</div>

Thank you for sharing your results.

The difference may be when streaming in and out the actor is being reconstructed.

In this case a simpler approach may be to use deferred spawning and flagging those spawned actors, then finish spawning.

Here’s a [thread](https://forums.unrealengine.com/t/check-if-an-actor-was-placed-in-editor-or-spawned-at-runtime/373272/4) on that.

Another option would be to utilize RF\_WasLoaded according to this [thread](https://forums.unrealengine.com/t/check-if-actor-placed-from-the-editor/301700/5), but you’d need to ensure the level is saved after dragging the actor in. The thread also mentions AActor::IsNetStartupActor which uses bNetStartup.

I’d recommend the deferred spawning approach where you add a flag, finishing spawning, and then check that flag.

Please let me know if that works for you.

Thank you!

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![john.yatco](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@john.yatco](https://forums.unrealengine.com/u/john.yatco)\
**Post date:** [December 19, 2025, 4:04pm UTC](https://forums.unrealengine.com/t/test-spawn-actor-in-uactorcomponent-beginframe/2693060/10 "2025-12-19T16:04:38Z")

</div>

Awesome, glad to hear! I’ll go ahead and close this case but feel free to respond here if you have follow-up questions.

Thank you!

[Attachment Removed]
