Copyright © 2026 Unity Technologies
Steps to reproduce:
1. Have bluetooth headphones connected to the PC
2. Create new Unity project using Universal 3D Template
3. Install AI Package via toolbar AI button
4. Go to Assets > Create > Audio > Generate Audio Clip
5. Dock “Generate New Sound” tab next to Game tab
6. Generate any sound (e.g “barking”)
7. When Audio is generated, disconnect headphones
8. Press Play button on generated Audio Clip in “Generate New Sound” window and observe the Console window
Actual results: “ArgumentException: length” error is thrown in the Console window when trying to play generated Audio clip when headphones are disconnected, Audio doesn’t play
Expected results: No errors are thrown in the Console window trying to play generated Audio clip when headphones are disconnected, Audio plays
Reproducible with versions: 2.8.0-pre.1 (6000.0.76f1, 6000.3.16f1, 6000.4.8f1, 6000.5.0b9, 6000.6.0a4)
Tested on (OS): macOS Silicon Tahoe 26.4.1 (M1)
Notes:
ArgumentException: length System.Array.Copy (System.Array sourceArray, System.Int32 sourceIndex, System.Array destinationArray, System.Int32 destinationIndex, System.Int32 length) (at <f9eab83828c04543b2f7b6f782ef928e>:0) Unity.AI.Sound.Services.Utilities.AudioClipOscillogramUtils.MakeSampleReference (UnityEngine.AudioClip audioClip, System.Int32 width, System.Single zoomScale, System.Single panOffset, System.Action`1[T] onAboutToBeDestroyed) (at ./Library/PackageCache/com.unity.ai.assistant@667f49aff9c0/Modules/Unity.AI.Sound/Utilities/AudioClipOscillogramUtils.cs:139) Unity.AI.Sound.Components.GenerationTile.OnGeometryChanged (UnityEngine.UIElements.GeometryChangedEvent evt) (at ./Library/PackageCache/com.unity.ai.assistant@667f49aff9c0/Modules/Unity.AI.Sound/Components/GenerationSelector/GenerationTile.cs:245) System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <f9eab83828c04543b2f7b6f782ef928e>:0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:156) UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:84) UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:110) UnityEngine.StackTraceUtility:ExtractStringFromExceptionInternal(Object, String&, String&) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:50)
Issues you vote on will appear here