Skip to content

Fix simLoadLevel and Levels OptionsMenu #4551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 29, 2022

Conversation

alonfaraj
Copy link
Contributor

Fixes: #4432
Fixes: #4542

About

This PR fix load level mechanism, simplify and cleanup the whole process.
OptionsMenu was fixed as well to list the available maps under /Game folder only.
Till now, load level was loading the level as streaming level on top of the existing level.
As far as I understand, this logic assume a level is always exists and keep loading the rest of the levels as streaming levels which is not the desired behavior.
I have used a simpler method, UGameplayStatics::OpenLevel instead of AirsimLevelStreaming class which is not needed.
This method take care of unload and load the requested level, and make it Persistent.

How Has This Been Tested?

Run the blocks project and switch between 2 levels with different PlayerStart positions, as well as using the python API.
Tested on packaged game (windows) as well.
To test it on package, you should specify the desired maps:
Project settings -> packaging -> List of maps to include in packages build

Screenshots (if appropriate):

capture.mp4

@jonyMarino
Copy link
Collaborator

@alonfaraj Thanks for this contribution. I agree that this is the right approach. Thanks for the detailed explanation. I didn't remember where was the list to include other levels 😄

@jonyMarino jonyMarino merged commit 4b758d0 into microsoft:master Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

simLoadLevel (C++ API) doesn't destroy assets before loading new Level simLoadLevel does not correctly switch between maps
2 participants