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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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