Attempting to set the Pressed Sound for Widget Style dynamically never actually sets the sound. When you click the button, you get no pressed sound. However, when setting the Pressed Sound through the Button's details panel, the sound plays without issue.
Found in 4.9.2 binary. Reproduced in 4.10 Preview 4 and Main CL 2752291.
1. Open the editor
2. Create a new Widget BP
3. Add a button
4. Get a reference to the button in the event graph of the Widget BP
5. Drag off of the Button, and add a get style node
6. Split the struct pin
7. Drag off of the button and add a set style node
8. Connect all of the pins except for the Widget Style Pressed Sound.
9. Split the Widget Style Pressed Sound pin
10. Promote to a variable, and set the default to a sound effect. Attached image of the blueprint setup for reference.
11. Add the widget to the viewport
12. Click on the button
Result: No sound plays when the button is clicked.
Expected: Sound would be set to the value of the Sound variable, and would play upon clicking the button.
Head over to the existing Questions & Answers thread and let us know what's up.
2 |
Component | UE - Editor - UI Systems |
---|---|
Affects Versions | 4.9.2, 4.10, 4.11 |
Created | Nov 6, 2015 |
---|---|
Resolved | Dec 14, 2018 |
Updated | Jul 14, 2021 |