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
Reflection based functions are those in camelcase (or with the first capital letter). Native functions instead follow the python style, with lower case, underscore-as-separator function names.
451
451
452
-
The automagic UClass and UEnums mappers
453
-
---------------------------------------
452
+
The automagic UClass, UStruct and UEnums mappers
453
+
------------------------------------------------
454
454
455
455
Instead of doing a gazilion of unreal_engine.find_class(name) calls, the plugin adds a 'magic' module called unreal_engine.classes. It allows to import unreal classes like python classes:
456
456
@@ -496,6 +496,20 @@ if is_hitting_something:
496
496
ue.log(hit_result)
497
497
```
498
498
499
+
Structs are exposed by the unreal_engine.structs virtual module. remember that structs are copied by value, so a unreal_engine.UScriptStruct object is exposed.
500
+
501
+
To create a new struct instance you can do:
502
+
503
+
```python
504
+
from unreal_engine.structs import TerrificStruct
505
+
506
+
ts = TerrificStruct()
507
+
```
508
+
509
+
To access the fields of a struct just call the fields() method.
510
+
511
+
A good example of struct usage is available here: https://github.com/20tab/UnrealEnginePython/blob/master/docs/Settings.md
0 commit comments