I assign a sound to a scene in Reality Composer as in the image below

I would like to create an UIButton that can be pressed to stop the sound. Can I do that?
I assign a sound to a scene in Reality Composer as in the image below

I would like to create an UIButton that can be pressed to stop the sound. Can I do that?
I created three Reality Composer actions for box scene: they are
Play Sound,Spinand Notify. As you can see loop playback is turned ON.SwiftUI
My code is as simple as that. Primary
stop()methods are for immediate stop of audio and animation. Secondarystop()methods are the content of completion handler foronActionproperty.And here's an ordinary binding.
Note that
Notifyaction is the last one in the sequence. After what time the secondarystop()methods will be applied (I mean the content of the completion handler), depends on the duration of the audio file or animation (my audio's duration is 14 sec).UIKit
UIKit solution is somehow different and slightly simpler.
P. S.
However, if you'll be using
Play Musicaction (in other words, on the scene basis, not on the object basis, likePlay Soundaction), you can implement your idea this way: