Skip to content

Commit c7b3f99

Browse files
author
rdeioris
authored
Create UnrealEngineModule.md
1 parent 3ae351d commit c7b3f99

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

docs/UnrealEngineModule.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
The unreal_engine module
2+
------------------------
3+
4+
This is a generic module, exposing functions not related to a particular 'World' (see below).
5+
6+
You can use these functions from an actor, a pawn, a component or directly from a module.
7+
8+
Just remember to import it:
9+
10+
```py
11+
import unreal_engine
12+
```
13+
14+
or (as an example)
15+
16+
```py
17+
import unreal_engine as ue
18+
```
19+
20+
21+
---
22+
```py
23+
uclass = unreal_engine.find_class('name')
24+
```
25+
26+
This function searches for a class in the engine with the specified name and returns its 'uobject' (a c++ UClass object internally).
27+
You can use this uobject to search for objects of that type or to spawn new actors (and lot of more things)
28+
29+
---
30+
```py
31+
uclass = unreal_engine.find_object('name')
32+
```
33+
34+
This is a more generic (and slower) variant of find_class that searches for every UObject. You can use it (for example) for getting references to assets (like materials, meshes...)
35+
36+
---
37+
```py
38+
unreal_engine.log('message')
39+
```
40+
41+
log a string into the editor output log (under the LogPython category/class)
42+
43+
44+
---
45+
```py
46+
unreal_engine.log_warning('message')
47+
```
48+
49+
log a warning string (yellow) into the editor output log (under the LogPython category/class)
50+
51+
52+
---
53+
```py
54+
unreal_engine.log_error('message')
55+
```
56+
57+
log an error string (red) into the editor output log (under the LogPython category/class)
58+
59+
60+
---
61+
```py
62+
unreal_engine.add_on_screen_debug_message(key, timeout, 'message')
63+
```
64+
65+
low-level equivalent of blueprint 'print string' function. It disappear after 'timeout' seconds and can get a numeric key (use -1 for disabling keys feature)
66+
67+
TODO: support for colors
68+
69+
70+
---
71+
```py
72+
unreal_engine.print_string('message')
73+
```
74+
75+
python equivalent of the blueprint 'print string' function. It disappears after 2 seconds and it is wrote in cyan color.
76+
77+
78+
---
79+
```py
80+
editor = unreal_engine.get_editor_world()
81+
```
82+
83+
(available only into the editor) it allows to get a reference to the editor world. This will allow in the near future to generate UObjects directly in the editor (for automating tasks or scripting the editor itself)
84+

0 commit comments

Comments
 (0)