Skip to content

Commit 8fa76f8

Browse files
author
rdeioris
authored
Create Settings.md
1 parent 97fe3cc commit 8fa76f8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/Settings.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Managing Settings
2+
=
3+
4+
Settings (both Editor and User-defined) are stored in standard UObject classes. The "mutable default object" if those classes is what stores the specific settings.
5+
6+
To access the "mutable default object" of a class you can use the ```unreal_engine.get_mutable_default(class)``` function.
7+
8+
The following example code shows how to change the Editor/Appearance settings:
9+
10+
```python
11+
import unreal_engine as ue
12+
from unreal_engine.classes import EditorProjectAppearanceSettings
13+
from unreal_engine.enums import EUnit
14+
15+
# access the editor appearance settings
16+
17+
appearance_settings = ue.get_mutable_default(EditorProjectAppearanceSettings)
18+
# print properties
19+
ue.log(appearance_settings.properties())
20+
21+
# assign meters as the default distance/length unit (as list of values)
22+
appearance_settings.DistanceUnits = [EUnit.Meters]
23+
```

0 commit comments

Comments
 (0)