Skip to content

Commit ac3140f

Browse files
author
Roberto De Ioris
authored
Update README.md
1 parent b4d5c3e commit ac3140f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,27 @@ vec = self.uobject.GetActorLocation()
431431

432432
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.
433433

434+
Note that, in editor builds, when you change the property of an archetype (included ClassDefaultObject) via __setattr__ all of the archtype instances will be updated too.
435+
436+
To be more clear:
437+
438+
```python
439+
your_blueprint.GeneratedClass.get_cdo().CharacterMovement.MaxWalkSpeed = 600.0
440+
```
441+
442+
is a super shortcut for:
443+
444+
```python
445+
your_blueprint.GeneratedClass.get_cdo().CharacterMovement.pre_edit_change('MaxWalkSpeed')
446+
your_blueprint.GeneratedClass.get_cdo().CharacterMovement.set_property('MaxWalkSpeed', 600.0)
447+
your_blueprint.GeneratedClass.get_cdo().CharacterMovement.post_edit_change_property('MaxWalkSpeed')
448+
for instance in your_blueprint.GeneratedClass.get_cdo().CharacterMovement.get_archetype_instances():
449+
instance.pre_edit_change('MaxWalkSpeed')
450+
instance.set_property('MaxWalkSpeed', 600.0)
451+
instance.post_edit_change_property('MaxWalkSpeed')
452+
```
453+
454+
434455
The automagic UClass, UStruct and UEnums mappers
435456
------------------------------------------------
436457

0 commit comments

Comments
 (0)