I build objects in my games. I have a function which fire at BeginPlay, working perfectly when i spawn my objects during the game.
But when i tried to load my object at the beginning, from the GameMode BeginPlay event, those spawned object are not firing the event.
BeginPlay should fire as soon as it’s spawned or when the game runs if placed in the world by hand.
Could you show your beginPlay code?
Well there is not much to show.
The parent object i am trying to spawn :
The actor spawner actor (which works fine !)
The BeginPlay of my GameMode :
In both case the object is properly spawned in the world. But the event BeginPlay is not fired in the second case and i have no message “Hello”
I tried replicating your issue,
Spawned a random object in my game from the gameMode BP.
Asked it to print from BeginPlay
And got the print just fine
Maybe you spawned a child and you’re not calling the parent’s BeginPlay?
Yes you are right i did not call parent, and doing so works. I do not really understand why it worked on my other call though, i am spawning my objects pretty much the same.
Thanks
system
(system)
Closed
July 25, 2024, 11:54pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.