In this recipe, you created a ButtonActions script class and added an instance as a component to the Main Camera GameObject. This has two public variables, one to an AudioSource component and one to an instance of the scripted AudioDestructBehaviour component.
The GameObject named AudioObject contains an AudioSource component, which stores and manages the playing of the audio clip. Interestingly, AudioObject also contains a scripted component, which is an instance of the AudioDestructBehaviour class. This script is initially disabled. When enabled, every frame in this object (via its Update() method) tests whether the audio source is playing (!audio.isPlaying). As soon as the audio is found to be not playing, the GameObject is destroyed.
Two UI buttons are created. The Button-play-sound button calls the ACTION_PlaySound() method of the scripted component in the Main Camera. This method will start playing the audio clip if it is...