Download

Sub level creation for BP interfaces

How many of you create a sub level in addition to your persistent level for BP (interface) communication only?
I am watching someone do this in a tutorial but I have no idea if this is BS or if its common practice so I guess I have to ask the community what they think.
Apparently its not very easy to communicate with persistent level … so he says.
Thank you !! :rolleyes:
I just dont want to spend another week going in the wrong direction.

That does sound like BS.

Levels are for putting stuff in, like you do with, er, levels.

BP interfaces are for making a generalized method of communicating with any kind of actor.

Why would you want to communicate with a level?

If you want to have something that exists all the time and can be accessed from most places pretty easily, then that’s when you start using one ( or more ) of:

Game instance

Savegame

Gamestate

Gamemode

Player controller

Etc

If someone is trying to communicate with a level, the one thing it probably means is they have a lot in the level BP ( common newbie thing ), and can’t reach it from anywhere.

The answer is the list above…

Yes thank you.
I have been using the game instance (user created one) to fire event dispatchers from Widget near start of the game to level BP and it works without a hitch.
I get no misses.

I am using the level BP because there is only one level in the game and the other BPies are going to get heavy and I know if you cast to them then all of it gets loaded into memory. So I am using the level BP in my case to do some heavy lifting. Avoiding the character BP and other actor BPies.

As @ClockworkOcean already mentioned, it’s not a good idea to have everything in the Level BP. For one, you can’t pass any information to it without Event Dispatchers. Secondly, it is generally a good idea to keep your logic in self contained blueprints based on the the unique purposes they each serve within your game’s overall design. Otherwise it’d be like having a car whose tires are somehow welded into the car itself. We won’t be able to just easily remove and replace them, but will have to make changes to the car itself as a whole everytime.

Plus, if you don’t have your actor and character BPs referencing several other actors in their BPs, casting to them (especially ones derived directly from the actor class) shouldn’t be a huge performance concern.

Great thank you!