diff --git a/Assets/Fungus/Docs/CHANGELOG.txt b/Assets/Fungus/Docs/CHANGELOG.txt index fd5ef1ed..3a7d305a 100644 --- a/Assets/Fungus/Docs/CHANGELOG.txt +++ b/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 ====== diff --git a/Assets/Fungus/Scripts/Components/WriterAudio.cs b/Assets/Fungus/Scripts/Components/WriterAudio.cs index b5162ca6..e751ef92 100644 --- a/Assets/Fungus/Scripts/Components/WriterAudio.cs +++ b/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 {