Browse Source

Cherry-pick WriterAudio.GetSecondsRemaining

Now on completion of the voice over clip the number of seconds remaining is 0
master
Steve Halliwell 4 years ago
parent
commit
54d9d396cd
  1. 1
      Assets/Fungus/Docs/CHANGELOG.txt
  2. 2
      Assets/Fungus/Scripts/Components/WriterAudio.cs

1
Assets/Fungus/Docs/CHANGELOG.txt

@ -9,6 +9,7 @@ Unreleased
## Changed
- Block will LogError when an exception is caught from a Command being Executed.
- WriterAudio.GetSecondsRemaining reports 0 if not playing. Thanks to KVinS.
v3.13.6
======

2
Assets/Fungus/Scripts/Components/WriterAudio.cs

@ -63,7 +63,7 @@ namespace Fungus
{
if (IsPlayingVoiceOver)
{
return targetAudioSource.clip.length - targetAudioSource.time;
return targetAudioSource.isPlaying ? targetAudioSource.clip.length - targetAudioSource.time : 0f;
}
else
{

Loading…
Cancel
Save