I’m putting together the front end of my game. It needs to work in this order:
Title screen (Player controller “0” has been created, press any key to continue)
Load / create new player screen (Loads player data, opens level. After this is where I get stuck)
Main menu (Level is open with camera fixed at last checkpoint, but player hasn’t spawned yet)
Continue game (Spawn player in already open level location)
It seems simple enough but I’m experiencing crashes anytime I try and open a level. I’m creating the player controller, spawning the player, and opening levels from the game mode. All the systems are already in place and should be correct, menus are build, game save system is working, etc. but things are obviously not connected correctly. I’ve been searching for a couple weeks for information / tutorials on setting up the game’s front end, but I can’t seem to find any solid tutorials that apply to what I need to do. Does anyone have any thoughts, or know of any tutorials or documentation I can look into to solve this? Thanks!
I wonder, what information can you glean from the crash? Are you executing any custom C++ code in your project, and do you have the editor debug symbols installed?
When your game crashes, you should be able to learn something about what caused the crash when the crash report window appears. It may be that you need to redesign your loading system, as you suspect, or it may be something easy to fix, like an uncaught nullptr exception.
Try to find out what the specific root cause of the crash is, and we can troubleshoot from there.
I should have been more specific. When loading a new level it seems to freeze, so I end up just having to shut down UE4 from the task manager. I haven’t been able to retrieve any information because of this, that I’m aware of being able to retrieve. I’m not using any custom C++, and I haven’t installed any editor debug symbols.
I’ll keep searching for the source of the problem. Thanks for the help!
show us your setup so we have some info to work with. i would guess that it may not be freezing but rather theres a issue with spawning the character or creating a player controller. then again without more info cant be sure.
Well I got it working. Must have been some kinda bug in the level I was trying to load itself. I tried loading some blank levels first, they worked. Then I tried loading some previous levels I made for testing purposes and havent used in months, they worked. Then I tried to load the specific level I wanted in the first place, didnt work again. Then I duplicated that level and loaded that one, it worked. Then I tried with the original level again and it worked. So yeah something about duplicating it must have fixed whatever was going wrong. Back on track. Thanks for the help everyone!