I’m trying to add a custom blueprint service to my game, in this case a simple character manager.
I did some testing and added it to the game mode, the problem is that my event begin play in the game mode isn’t getting hit until after all my characters are created, so it fails.
Where is the best place to put a new blueprint service so that it’s setup first when the game runs?
I am a bit confused on why your Blueprint would fail because it gets called after your Character is created. Doesn’t that mean your Character is valid and therefore can be used?
Let me know what your goal is with your Character Manager and maybe I can help more.
Thanks for replying. So the characters are working fine and without issue.
Here’s what I’m trying to do:
Game starts and the character manager is created
Any time a new character is added to the game world, the character calls the register function on the character manager
This way, when the game is running the character manager is aware of al the characters in the world.
So the issue I’m having right now is tha the characters are being created before the character manager is created.
So if the game mode is being created / started after everything else, where is the best place to put a new service like this character manager?
I’ve been able to get around the issue by constantly checking if the character manager is none, and forcing a spawn if it is.
While this works, I’d be interested if you know a better way of setting up a game service like this?
For now yes, the plan is to then expand on that so I can make sure only 20 of a certain character exist in the world, track which characters are parented to other characters, more advanced things like that.