unreal.PythonScriptLibrary
¶
- class unreal.PythonScriptLibrary(outer=None, name='None')¶
Bases:
unreal.BlueprintFunctionLibrary
Python Script Library
C++ Source:
Plugin: PythonScriptPlugin
Module: PythonScriptPlugin
File: PythonScriptLibrary.h
- classmethod execute_python_command_ex(python_command, execution_mode=PythonCommandExecutionMode.EXECUTE_FILE, file_execution_scope=PythonFileExecutionScope.PRIVATE) → (command_result=str, log_output=Array(PythonLogOutputEntry)) or None¶
Execute the given Python command.
- Parameters
python_command (str) – The command to run. This may be literal Python code, or a file (with optional arguments) that you want to run.
execution_mode (PythonCommandExecutionMode) – Controls the mode used to execute the command.
file_execution_scope (PythonFileExecutionScope) – Controls the scope used when executing Python files.
- Returns
true if the command ran successfully, false if there were errors.
command_result (str): The result of running the command. On success, for EvaluateStatement mode this will be the actual result of running the command, and will be None in all other cases. On failure, this will be the error information (typically a Python exception trace).
log_output (Array(PythonLogOutputEntry)): The log output captured while running the command.
- Return type
tuple or None