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
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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