Skip to content

Commit 2d15cc3

Browse files
author
Roberto De Ioris
authored
Update ManagingAssets.md
1 parent 0093ad0 commit 2d15cc3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/ManagingAssets.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,21 @@ materials = ue.get_assets_by_class('Material')
6363
Moving/Renaming assets
6464
-
6565

66-
The rename_asset() function allows you to change the package and object name of an asset:
66+
The rename_asset() function allows you to change the name of an asset:
6767

6868
```python
69-
ue.rename_asset('/Game/Materials/Mat001.Foobar', '/Game/NewMaterials/Mat001', 'FooBarUpdated')
69+
ue.rename_asset('/Game/Materials/Mat001.Foobar', 'FooBarUpdated')
7070
```
7171

72-
this will result in the /Game/NewMaterials/Mat001.FooBarUpdated asset. Beware, as the unreal editor retain the so called 'Redirector Object' that is basically a reference to the original object, so you will not be able to re-use the old name until you reload the editor.
72+
this will result in the /Game/Materials/FooBarUpdated.FooBarUpdated asset. Beware, as the unreal editor retain the so called 'Redirector Object' that is basically a reference to the original object, so you will not be able to re-use the old name until you reload the editor.
73+
74+
If you specify a full path as the destination, you can 'move' the asset:
75+
76+
```python
77+
ue.rename_asset('/Game/Materials/Mat001.Foobar', '/Game/Ops/FooBarUpdated')
78+
```
79+
80+
will results in /Game/Ops/FooBarUpdated.FooBarUpdated asset
7381

7482
Duplicating assets
7583
-

0 commit comments

Comments
 (0)