feat: ship title screen media and map
This commit is contained in:
1 parent
98e852c980
commit
1d5988bc03
8 files changed
+140
-1
No files matched your search
@@ -0,0 +1,26 @@
|
||||
"""Validate generated title-screen assets in an Unreal Python commandlet."""
|
||||
from pathlib import Path
|
||||
|
||||
import unreal
|
||||
|
||||
AUDIO_ASSET = "/Game/Pogo/Audio/S_PogoTitleMusic"
|
||||
TITLE_MAP = "/Game/Pogo/Maps/Lvl_TitleScreen"
|
||||
|
||||
movie = Path(unreal.Paths.project_content_dir()) / "Movies/pogo.mp4"
|
||||
assert movie.is_file(), f"Missing packaged movie: {movie}"
|
||||
|
||||
sound = unreal.EditorAssetLibrary.load_asset(AUDIO_ASSET)
|
||||
assert sound, f"Missing sound asset: {AUDIO_ASSET}"
|
||||
assert sound.get_editor_property("looping") is True, "Title music is not looping"
|
||||
|
||||
assert unreal.EditorLevelLibrary.load_level(TITLE_MAP), f"Could not load {TITLE_MAP}"
|
||||
world = unreal.EditorLevelLibrary.get_editor_world()
|
||||
assert world, "No editor world after loading title map"
|
||||
settings = world.get_world_settings()
|
||||
assert settings, "Title map has no WorldSettings"
|
||||
assert (
|
||||
settings.get_editor_property("default_game_mode")
|
||||
== unreal.PogoTitleScreenGameMode.static_class()
|
||||
), "Title map does not use PogoTitleScreenGameMode"
|
||||
|
||||
unreal.log("POGO_TITLE_VERIFY PASS")
|
||||
Reference in new issue
Block a user