You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+82-54Lines changed: 82 additions & 54 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,14 @@ Embed Python in Unreal Engine 4
7
7
This fork is meant to encapsulate python + pip + scripts fully in the plugin and to allow dependency plugins to be built on top of the python plugin. Specifically it means adding automatic pip dependency resolution and automatic sys.path additions such that the resulting two plugins can be fully drag and dropped into a new project.
Funny snippets for working with StaticMesh and SkeletalMesh assets: https://github.com/20tab/UnrealEnginePython/blob/master/tutorials/SnippetsForStaticAndSkeletalMeshes.md
16
+
17
+
More tutorials: https://github.com/20tab/UnrealEnginePython/tree/master/tutorials
11
18
12
19
# How and Why ?
13
20
@@ -29,10 +36,12 @@ Once the plugin is installed and enabled, you get access to the 'PythonConsole'
29
36
30
37
All of the exposed engine features are under the 'unreal_engine' virtual module (it is completely coded in c into the plugin, so do not expect to run 'import unreal_engine' from a standard python shell)
31
38
32
-
The currently supported Unreal Engine versions are 4.12, 4.13, 4.14, 4.15, 4.16, 4.17, 4.18and 4.19
39
+
The currently supported Unreal Engine versions are 4.12, 4.13, 4.14, 4.15, 4.16, 4.17, 4.18, 4.19 and 4.20
33
40
34
41
We support official python.org releases as well as IntelPython and Anaconda distributions.
35
42
43
+
Note: this plugin has nothing to do with the experimental 'PythonScriptPlugin' included in Unreal Engine >= 4.19. We aim at full integration with engine and editor (included the Slate api), as well as support for the vast majority of python features like asyncio, coroutines, generators, threads and third party modules.
44
+
36
45
# Binary installation on Windows (64 bit)
37
46
38
47
Check in the releases page (https://github.com/20tab/UnrealEnginePython/releases) if there is a binary version that matches your configuration (otherwise open an issue asking us for it [please specify the python version too]) and download it.
More details here: https://github.com/20tab/UnrealEnginePython/blob/master/docs/MemoryManagement.md
529
+
519
530
The ue_site.py file
520
531
-------------------
521
532
@@ -783,55 +794,81 @@ It allows you to run, create, modify and delete scripts directly from the UE edi
783
794
784
795
The first pull request for the editor has been issued by https://github.com/sun5471 so many thanks to him ;)
785
796
786
-
Integration with PyQT
787
-
---------------------
797
+
Integration with Qt4/Qt5/PySide2
798
+
--------------------------------
788
799
789
-
To correctly integrates PyQT with UnrealEngine the python plugin must correctly setup the GIL (and this is done) and exceptions must be managed ad-hoc (not doing it will result in a deadlock whenever a qt signal handler raises an exception)
800
+
Thanks to solid GIL management, you can integrate Qt python apps in Unreal Engine 4.
790
801
791
-
This is an example of having a QT window along the editor to trigger asset reimporting (pay attention to the sys.excepthook usage):
802
+
Pay attention to not call app.exec_() as it will result in Qt taking control of the UE loop. Instead use a ticker to integrate the Qt loop in the editor loop:
792
803
793
-
```py
794
-
from PyQt5.QtWidgets import QApplication, QWidget, QListWidget
(no need to allocate a new Qt app, or start it, as the UE4 Editor, thanks to to ueqt module is now the Qt app itself)
869
+
870
+
Note the 2 final lines: they 'attach' the Qt window as a 'child' of the editor root window. Note that on windows platform this is not simple parenting but 'ownership'.
871
+
835
872
Memory management
836
873
-----------------
837
874
@@ -841,6 +878,7 @@ Starting from release 20180226 a new memory management system has been added (FU
841
878
842
879
The same system works for delegates, as well as Slate.
843
880
881
+
More details here: https://github.com/20tab/UnrealEnginePython/blob/master/docs/MemoryManagement.md
844
882
845
883
Unit Testing
846
884
------------
@@ -851,25 +889,14 @@ To run the unit tests (ensure to run them on an empty/useless project to avoid m
0 commit comments