Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto De Ioris committed Aug 9, 2018
2 parents 948825c + 513f8f4 commit 31e8dfd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion docs/Animation_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
You can control animation blueprints variables and events easily:

```py

from unreal_engine.classes import SkeletalMeshComponent

# get a reference to the skeletal mesh
skeletal = self.uobject.get_component_by_type('SkeletalMeshComponent')
skeletal = self.uobject.get_component_by_type(SkeletalMeshComponent)
# get a reference to the animation class
animation = skeletal.get_anim_instance()

Expand Down
4 changes: 3 additions & 1 deletion docs/Audio_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ self.uobject.play_sound_at_location(sound, FVector(0, 0, 0))
If you prefer to work with AudioComponent:

```py
from unreal_engine.classes import AudioComponent

class Sounder:
def begin_play(self):
# find the AudioComponent of this actor
self.audio = self.uobject.get_component_by_type('AudioComponent')
self.audio = self.uobject.get_component_by_type(AudioComponent)
self.audio.call('Stop')
def tick(self, delta_time):
# start the sound when pressing 'A'
Expand Down
5 changes: 2 additions & 3 deletions docs/uobject_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,13 @@ return True if the actor has a component of the specified type

---
```py
yesno = uobject.get_actor_component_by_type(uclass)
component = uobject.get_actor_component_by_type(uclass)
# alias
yesno = uobject.get_component_by_type(uclass)
component = uobject.get_component_by_type(uclass)
```

return the first component (of an actor) of the specified type

It has two shortcuts, it can retrieve the actor from a component, and can get a string (instead of the output of ue.find_class('name')) with the class of the component

---
```py
Expand Down

0 comments on commit 31e8dfd

Please sign in to comment.