Anyway, I would like to create a hierarchy of components without an actor. The component would be spawned at runtime and attached to a specified actor that already exists. Is it not possible to create a component using the viewport in the same way that Actors are created? Why not?
I really do not see a purpose of this. You can much better have the components installed on the actors that might need them. and then trigger them when needed.
First, you can have one public actor in the level that does that and you can spawn components on runtime for actors so again I don’t know what are you trying to do…
“you can have one public actor in the level that does that”
That does what? I’m not entirely sure what you are referring to here.
Spawning single components at runtime is easy as long as they they aren’t expected to also have child components.
With an actor, you have a viewport and component list where you can easily add additional components under the root component. Where an actor is spawned in the world, the root components are automatically created and attached. I need to create a component that has child components that can be created at runtime and attached to any actor of my choosing.
Now, I could use BeginPlay on a component blueprint to spawn it’s child components and set all my values. Or I can create an actor and just attach it as a child actor component. I want to avoid creating actors that aren’t needed but using BeginPlay and setting all values will be very tedious. So that leaves me with either a very tedious process or process that adds unnecessary overhead.
EDIT:
“…I can create an actor and just attach it as a child actor component…”
but because I don’t actually need the actor at this point, I might as well transfer the component to the desired actor, still adding unwanted overhead.
I see so you just gave a solution to your own problem but don’t want to do it because it’s too tedious welp this is a comment that you should have asked as [DEVS] or something because everyone here is trying to help you with the problem, when what you want is a new Plugin or some update for the component with a viewport. Good luck with that mate…
I wasn’t sure it wasn’t actually possible until I did another few hours of research into it last night. but even so, this video is 4 years old so I was hoping that it would have been something that would have been implemented since then. It seems like it would be an extremely powerful feature for games that focus on user generated content or even proc gen games. But it doesn’t sound like it’s a thing, yet. Thanks for the well wishes!