Skip to content

Commit 71ddadf

Browse files
author
Roberto De Ioris
authored
Update Level_API.md
1 parent 47d5152 commit 71ddadf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/Level_API.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,23 @@ child_level2 = child_world2.PersistentLevel
5757
# open main world in the editor
5858
ue.open_editor_for_asset(main_world)
5959
```
60+
61+
## Joining Levels to a single world
62+
63+
So we now know that each world asset has its level counterpart, and this level is the 'joint' a world can use to attach to another world to implement composition (useful if multiple developers works in different areas of the scene) or streaming.
64+
65+
To attach a level to a world you can use the following function:
66+
67+
```python
68+
import unreal_engine as ue
69+
70+
# note we pass the name of the asset instead of the uobject !
71+
added_level = ue.add_level_to_world(main_world, child_world1.get_path_name()[, always_loaded])
72+
```
73+
74+
Remember that you need to pass the asset path of the world you want to attach !
75+
76+
The always_loaded optional boolean parameter, if set, will add a persistent level instead of a streaming one (it means whenever you load the main_world even child_world1 will be enabled too)
77+
78+
79+

0 commit comments

Comments
 (0)