This repository has been archived on 2026-05-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
AgrarianGameArchive/Scripts/setup_interaction_prompt.py
T
2026-05-15 15:43:37 -07:00

25 lines
729 B
Python

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()