Search Issue Tracker
Not Reproducible
Votes
0
Found in
5.6.1f1
Issue ID
913801
Regression
No
The "Audiosource.time" and "Audiosource.timeSamples" commands do not work when the AudioClip is set through the script
Steps to reproduce:
1. Open QA attached project "AudioSampleRepro.zip"
2. Open Test scene
3. Observe Audio source attached on "Main Camera"
4. Enter Play mode and observe "Audio clip" set and music playing
5. AudioSource.time and AudioSource.timeSamples output to console are both 0
6. Exit play mode and set the AudioClip manually to be the music from Assets folder
7. Enter Play mode and observe the "time" and "timesamples" work properly
Expected: When you set the AudioClip during runtime "time" and "timeSamples" should work properly
Actual: When you set the AudioClip during runtime the commands return 0 as if nothing is playing
Reproduced on 5.4.5p1, 5.5.3p4, 5.6.1f1, 5.6.1p1, 2017.1.0b6, 2017.2.0a1
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Nopol10
Dec 08, 2017 08:02
I have encountered this in 2017.2.0f3 in WebGL builds of my game. After setting the AudioSource.time and AudioSource.timeSamples of an audiosource the music plays but retrieving the AudioSource.time and timeSamples value returns 0