I’m trying to create a house in Blueprint, and I’m looking for a way to implement doors that can be opened and closed, and lights that can be turned on.
As far as I searched, the only way to use functional templates in a Blueprint is as a Child Actor component.
However, child actor components have a very bad reputation.
Some studios even ban it entirely.
The alternative, Attach Actor, is not suitable for my use case because Spawn Actor cannot be used in Construction Script.
A child actor component is nothing else than an actor component that spawns an Actor when registered, and destroys it when unregistered.
Meaning that it is a wrapper for “Spawn Actor From Class” with extra steps.
The reason some studios may ban ChildActorComponent s is because of how limited they are.
Meaning that spawning and destroying the child actor, synced with the owning actor’s lifecycle, is all they do.
Some studios need more control over child actors, whereas the ChildActorComponent is not enough.
For instance they have known problems with replication and don’t always behave properly in the editor.
Also they don’t officially support nesting. Having a ChildActorComponent inside another ChildActorComponent can cause undefined behavior.
If you don’t want to use ChildActorComponents after that, another alternative would be to simply Spawn and attach the blueprint actor on BeginPlay.
(But this way, you won’t have an editor preview of it)
Ari mentions them in his Myth-Busting talk (timestamp)
At the end of the day, that question can be answered with both yes (20%) and no (80%).
It really depends on how complex your child actors will be and if you’re fine with the said limitations.
In other words, if the function is completed by the child actor alone, it can be considered to have the same function as Spawn Actor.
The stories I’ve heard mostly mention performance bugs and incorrect behavior, but that probably just means it wasn’t well suited to their use case.
Since I only want to template multiple Geometry Collections and Meshes as part of building a house, I don’t think I run into any of the limitations you mention.