Skip to content

Commit a2a966f

Browse files
author
rdeioris
authored
Update Settings.md
1 parent 6f574a9 commit a2a966f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/Settings.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,33 @@ ue.log(appearance_settings.properties())
2020

2121
# assign meters as the default distance/length unit (as list of values)
2222
appearance_settings.DistanceUnits = [EUnit.Meters]
23+
24+
appearance_settings.save_config()
25+
```
26+
27+
Another example changing action mappings of the input system:
28+
29+
```python
30+
import unreal_engine as ue
31+
from unreal_engine.classes import InputSettings
32+
from unreal_engine.structs import InputActionKeyMapping, Key
33+
34+
inp = ue.get_mutable_default(InputSettings)
35+
36+
km = InputActionKeyMapping()
37+
km.ActionName = 'Kill'
38+
key = Key()
39+
key.KeyName = 'x'
40+
km.Key = key
41+
km.bAlt = True
42+
43+
km2 = InputActionKeyMapping()
44+
km2.ActionName = 'Explode'
45+
key = Key()
46+
key.KeyName = 'y'
47+
km2.Key = key
48+
km2.bAlt = False
49+
50+
inp.ActionMappings = [km, km2]
51+
inp.save_config()
2352
```

0 commit comments

Comments
 (0)