File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Source/UnrealEnginePython Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 11#include " UnrealEnginePythonPrivatePCH.h"
22
33#include " PythonScript.h"
4+
5+ void UPythonScript::Run () {
6+ FUnrealEnginePythonModule &PythonModule = FModuleManager::GetModuleChecked<FUnrealEnginePythonModule>(" UnrealEnginePython" );
7+ PythonModule.RunFile (TCHAR_TO_UTF8 (*ScriptPath));
8+ }
9+
10+ void UPythonScript::RunSandboxed () {
11+ FUnrealEnginePythonModule &PythonModule = FModuleManager::GetModuleChecked<FUnrealEnginePythonModule>(" UnrealEnginePython" );
12+ PythonModule.RunFileSandboxed (TCHAR_TO_UTF8 (*ScriptPath));
13+ }
Original file line number Diff line number Diff line change @@ -19,8 +19,11 @@ class UPythonScript : public UObject
1919 UPROPERTY (EditAnywhere, Category = " Python" )
2020 TArray<FString> FunctionArgs;
2121
22- // void Run();
23- // void RunSandboxed();
22+ UFUNCTION ()
23+ void Run ();
24+
25+ UFUNCTION ()
26+ void RunSandboxed ();
2427
2528};
2629
You can’t perform that action at this time.
0 commit comments