Hey guys,
Is there a way to avoid a hard reference when spawning an actor out of a blueprint?
I am currently at fixing size maps and dependency chains at my project.
And every spawn actor from class node creates a hard reference. And also putting the required class into a variable and setting the default o the required class creates a hard reference.
(I would also like to avoid using c++ native parents)
„cast to ABC class“??? If you are casting to specific class then it will create a hard reference to it.
Like ClockworkOcean exemplified, you need to cast to “cast to Actor class”.
you could create a Spawner actor and trigger it with an interface message or an event dispatcher. That way the spawner will have the hard reference, but your current actor won’t, if you are trying to avoid the hard reference in that specific actor.
Your main actor can also pass a soft object reference to the spawner, so it can specify which actor you want to spawn.