Skip to content

Commit aecb2d4

Browse files
author
Roberto De Ioris
authored
Update Audio_API.md
1 parent b61ddc2 commit aecb2d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/Audio_API.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ self.uobject.play_sound_at_location(sound, FVector(0, 0, 0))
1212
If you prefer to work with AudioComponent:
1313

1414
```py
15+
from unreal_engine.classes import AudioComponent
16+
1517
class Sounder:
1618
def begin_play(self):
1719
# find the AudioComponent of this actor
18-
self.audio = self.uobject.get_component_by_type('AudioComponent')
20+
self.audio = self.uobject.get_component_by_type(AudioComponent)
1921
self.audio.call('Stop')
2022
def tick(self, delta_time):
2123
# start the sound when pressing 'A'

0 commit comments

Comments
 (0)