赞
踩
#config ProRoot='D:/UEProject' EnginRoot='D:/Epic Games/UE_5.0EA' ProName='test_build.uproject' UnrealEditorCMD='UnrealEditor-Cmd.exe' UE5Win64Path=EnginRoot+'/Engine/Binaries/Win64' UE5BatchFiles=EnginRoot+'/Engine/Build/BatchFiles' ProjectPath=ProRoot+'/'+ProName #先构建个小场景 清理一下,测试后发先不这么做无法正常执行构建(可能我电脑问题吧...) unreal.EditorLevelLibrary.load_level('/Game/Template/BuildLevel') swarm=UnrealEditorCMD+' "'+ProjectPath+'" -run=resavepackages -buildlighting -quality=Preview -allowcommandletrendering -map=BuildLevel' unreal.EditorAssetLibrary.save_directory('/Game') unreal.EditorLevelLibrary.save_current_level() os.chdir(UE5Win64Path) os.system(swarm) #需要构建的关卡 level_path='/Game/Level/SomeLevel unreal.EditorLevelLibrary.load_level(level_path) # -Quality=Preview/Medium/High/Production swarm=UnrealEditorCMD+' "'+ProjectPath+'" -run=resavepackages -buildlighting -quality=Preview -allowcommandletrendering -map=SomeLevel' unreal.EditorAssetLibrary.save_directory('/Game') unreal.EditorLevelLibrary.save_current_level() os.chdir(UE5Win64Path) os.system(swarm)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。