Implement interaction prompt

This commit is contained in:
2026-05-15 15:43:37 -07:00
parent f508b7d494
commit 3132ed462e
9 changed files with 176 additions and 17 deletions
+24
View File
@@ -0,0 +1,24 @@
import unreal
def load(path):
asset = unreal.EditorAssetLibrary.load_asset(path)
if not asset:
raise RuntimeError(f"Could not load {path}")
return asset
def main():
game_mode_bp = load("/Game/ThirdPerson/Blueprints/BP_ThirdPersonGameMode")
game_mode_cdo = unreal.get_default_object(game_mode_bp.generated_class())
hud_class = unreal.load_class(None, "/Script/AgrarianGame.AgrarianDebugHUD")
if not hud_class:
raise RuntimeError("Could not load /Script/AgrarianGame.AgrarianDebugHUD")
game_mode_cdo.set_editor_property("hud_class", hud_class)
unreal.EditorAssetLibrary.save_loaded_asset(game_mode_bp)
unreal.log("Agrarian interaction prompt setup complete.")
main()