diff --git a/client/ayon_unreal/hooks/pre_workfile_preparation.py b/client/ayon_unreal/hooks/pre_workfile_preparation.py index 567b1263..24951828 100644 --- a/client/ayon_unreal/hooks/pre_workfile_preparation.py +++ b/client/ayon_unreal/hooks/pre_workfile_preparation.py @@ -130,7 +130,8 @@ def exec_ue_project_gen(self, self.data["project_name"], unreal_project_name, engine_path, - project_dir + project_dir, + env=self.launch_context.env ) ue_project_worker.moveToThread(q_thread) q_thread.started.connect(ue_project_worker.run) diff --git a/client/ayon_unreal/ue_workers.py b/client/ayon_unreal/ue_workers.py index 3f75045b..559d8385 100644 --- a/client/ayon_unreal/ue_workers.py +++ b/client/ayon_unreal/ue_workers.py @@ -165,7 +165,10 @@ def execute(self): commandlet_cmd.append("-GenerateCode") gen_process = subprocess.Popen( - commandlet_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE + commandlet_cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + env=self.env, ) for line in gen_process.stdout: