Search Issue Tracker
By Design
Votes
0
Found in [Package]
2.0.0a12
Issue ID
UVSB-875
Regression
Yes
Build error - audioclip does not support code generation
Repro is inconsistent in new Setup projects, but can't seem to fix this issue in a larger project.
Graph information provided in the attached .zip file. [^2020-06-26-16-15-08.zip]
Repro:
1. Create canvas with button and audiosource with an audioclip set.
2. Create graph that plays audiosource clip on button click.
3. Try to build.
Expected result: builds successfully.
Actual result: build fails, 'audioclip does not support code generation' error. Detailed at end of report. Can be seen in PickupHandler_Preview.cs and PickupHandler_Real.cs files. [^2020-06-26-16-15-08.zip]
Reproducible on branch release/2.0.0a12 using Unity 2020.2.0a15 and Unity 2019.4.1f1
Issues in: 2.0.0a10 - build succeeds but the button doesn't play sound in build. Compilation error appears a few seconds after build runs, detailed in notes.
Did not reproducible in: 2.0.0a8, 2.0.0a9
Notes:
- No issues playing sound in playmode.
- Set lower user prevalence as I can't get a 100% consistent repro.
- If the build instead succeeds, first build seems to fail to play the sound on button click. Second build is usually fine.
- Replaced package files in bigger project multiple times, project continues to work but build does not.
- 2.0.0a10 compilation error:
{noformat}
Assets\Ludiq.Generated\Transient\Scripts\TestClass.cs(45,90): error CS1503: Argument 2: cannot convert from 'Ludiq.Bolt.Generated.TestClass' to 'Ludiq.Bolt.IGeneratedStateTransition'
{noformat}
Error messages on build:
{noformat}
Unhandled exception during generation:
System.NotSupportedException: AudioClip does not support code generation.
at Unity.Bolt.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].GetDecoratorType (System.Type decoratedType) [0x00036] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Decorators\SingleDecoratorProvider.cs:110
at Unity.Bolt.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].CreateDecorator (TDecorated decorated) [0x00029] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Decorators\SingleDecoratorProvider.cs:44
at Unity.Bolt.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].GetDecorator (TDecorated decorated) [0x000a7] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Decorators\SingleDecoratorProvider.cs:293
at Unity.Bolt.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].GetDecorator[T] (TDecorated decorated) [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Decorators\SingleDecoratorProvider.cs:307
at Unity.Bolt.XGeneratorProvider.Generator[TGenerator] (System.Object o, Unity.Bolt.IGeneration generation) [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\GeneratorProvider.cs:24
at Unity.Bolt.BoltGenerationUtility.GenerateLiteral (System.Object o, Unity.Bolt.IGeneration generation) [0x00013] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\BoltGenerationUtility.cs:43
at Unity.Bolt.FlowGraphVariableGenerator.GenerateField (Unity.Bolt.FieldGeneration field) [0x00009] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Flow\Editor\Generation\FlowGraphVariableGenerator.cs:57
at Unity.Bolt.CompositeGeneration`1+<>c__DisplayClass8_0`2[TDeclaration,TGeneration,TCode].<BoundGenerator>b__0 (TGeneration generation) [0x00000] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\CompositeGeneration.cs:37
at Unity.Bolt.FieldGeneration.GenerateDeclaration () [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\FieldGeneration.cs:18
at Unity.Bolt.MemberGeneration`1[TDeclaration].Unity.Bolt.IMemberGeneration.GenerateDeclaration () [0x00000] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\MemberGeneration.cs:32
at Unity.Bolt.CompositeGeneration`1+<>c[TDeclaration].<GenerateMembers>b__26_0 (Unity.Bolt.IMemberGeneration m) [0x00000] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\CompositeGeneration.cs:162
at System.Linq.Enumerable+SelectIListIterator`2[TSource,TResult].MoveNext () [0x00048] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000db] in <fb001e01371b4adca20013e0ac763896>:0
at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
at Unity.Bolt.BoltClassGenerator.GenerateDeclaration (Unity.Bolt.ClassGeneration classGeneration) [0x00041] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generators\BoltClassGenerator.cs:102
at Unity.Bolt.ClassGeneration.GenerateDeclaration () [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\ClassGeneration.cs:25
at Unity.Bolt.TypeGeneration`1[TDeclaration].Unity.Bolt.ITypeGeneration.GenerateDeclaration () [0x00000] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\TypeGeneration.cs:11
at Unity.Bolt.DocumentGenerator.Generate (Unity.Bolt.DocumentGeneration generation) [0x00241] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generators\DocumentGenerator.cs:61
at Unity.Bolt.DocumentGeneration.Generate () [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\DocumentGeneration.cs:33
at Unity.Bolt.RootGeneration.Generate () [0x00022] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\RootGeneration.cs:106
at Unity.Bolt.GenerationWorkflow+<>c__DisplayClass2_0.<Generate>b__1 (Unity.Bolt.Task generationTask) [0x0007f] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\GenerationWorkflow.cs:75
UnityEngine.Debug:LogError(Object)
Unity.Bolt.<>c__DisplayClass2_0:<Generate>b__1(Task) (at Assets/Package/Bolt.Core/Editor/Generation/GenerationWorkflow.cs:79)
Unity.Bolt.Task:Run() (at Assets/Package/Bolt.Core/Editor/Tasks/Task.cs:66)
Unity.Bolt.ForegroundTaskRunner:Run(Task) (at Assets/Package/Bolt.Core/Editor/Tasks/Runners/ForegroundTaskRunner.cs:25)
Unity.Bolt.Task:Run(String, Int32, Action`1) (at Assets/Package/Bolt.Core/Editor/Tasks/Task.cs:206)
Unity.Bolt.GenerationWorkflow:Generate(Boolean) (at Assets/Package/Bolt.Core/Editor/Generation/GenerationWorkflow.cs:47)
Unity.Bolt.GenerationBuildProcessor:OnPreprocessBuild(BuildReport) (at Assets/Package/Bolt.Core/Editor/Generation/GenerationBuildProcessor.cs:18)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
{noformat}
{noformat}
Error building Player: Unhandled exception during generation:
System.NotSupportedException: AudioClip does not support code generation.
at Unity.Bolt.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].GetDecoratorType (System.Type decoratedType) [0x00036] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Decorators\SingleDecoratorProvider.cs:110
at Unity.Bolt.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].CreateDecorator (TDecorated decorated) [0x00029] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Decorators\SingleDecoratorProvider.cs:44
at Unity.Bolt.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].GetDecorator (TDecorated decorated) [0x000a7] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Decorators\SingleDecoratorProvider.cs:293
at Unity.Bolt.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].GetDecorator[T] (TDecorated decorated) [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Decorators\SingleDecoratorProvider.cs:307
at Unity.Bolt.XGeneratorProvider.Generator[TGenerator] (System.Object o, Unity.Bolt.IGeneration generation) [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\GeneratorProvider.cs:24
at Unity.Bolt.BoltGenerationUtility.GenerateLiteral (System.Object o, Unity.Bolt.IGeneration generation) [0x00013] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\BoltGenerationUtility.cs:43
at Unity.Bolt.FlowGraphVariableGenerator.GenerateField (Unity.Bolt.FieldGeneration field) [0x00009] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Flow\Editor\Generation\FlowGraphVariableGenerator.cs:57
at Unity.Bolt.CompositeGeneration`1+<>c__DisplayClass8_0`2[TDeclaration,TGeneration,TCode].<BoundGenerator>b__0 (TGeneration generation) [0x00000] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\CompositeGeneration.cs:37
at Unity.Bolt.FieldGeneration.GenerateDeclaration () [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\FieldGeneration.cs:18
at Unity.Bolt.MemberGeneration`1[TDeclaration].Unity.Bolt.IMemberGeneration.GenerateDeclaration () [0x00000] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\MemberGeneration.cs:32
at Unity.Bolt.CompositeGeneration`1+<>c[TDeclaration].<GenerateMembers>b__26_0 (Unity.Bolt.IMemberGeneration m) [0x00000] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\CompositeGeneration.cs:162
at System.Linq.Enumerable+SelectIListIterator`2[TSource,TResult].MoveNext () [0x00048] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000db] in <fb001e01371b4adca20013e0ac763896>:0
at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
at Unity.Bolt.BoltClassGenerator.GenerateDeclaration (Unity.Bolt.ClassGeneration classGeneration) [0x00041] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generators\BoltClassGenerator.cs:102
at Unity.Bolt.ClassGeneration.GenerateDeclaration () [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\ClassGeneration.cs:25
at Unity.Bolt.TypeGeneration`1[TDeclaration].Unity.Bolt.ITypeGeneration.GenerateDeclaration () [0x00000] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\TypeGeneration.cs:11
at Unity.Bolt.DocumentGenerator.Generate (Unity.Bolt.DocumentGeneration generation) [0x00241] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generators\DocumentGenerator.cs:61
at Unity.Bolt.DocumentGeneration.Generate () [0x00001] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\DocumentGeneration.cs:33
at Unity.Bolt.RootGeneration.Generate () [0x00022] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\Generations\RootGeneration.cs:106
at Unity.Bolt.GenerationWorkflow+<>c__DisplayClass2_0.<Generate>b__1 (Unity.Bolt.Task generationTask) [0x0007f] in D:\UnityWork\Bolt\CleanAudioProject\Bolt2.Debug.Unity2019\Assets\Package\Bolt.Core\Editor\Generation\GenerationWorkflow.cs:75
{noformat}
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
- Rigidbody2D.Slide API does not have the needed configuration when creating a 2D Top-Down character controller
- Opening reference for "Playables"component redirects to a missing page
- Sprite Renderer image is changed when switching Mask Interaction and changing Sprite to a shared Sprite
- An unsigned integer is not compared with an integer correctly in player when using IL2CPP backend
- Graphical artifacts are being rendered in Scenes that are loaded during run-time when GPU Resident Drawer is turned on
Resolution Note:
Unable to repo on macOS using Bolt 2.0.0.a13RC2 with Unity 2019.4.4f1.
Tried both generated and live mode. Builds correctly and sound is correct on both builds. Might be an issue when scaled up. Something we should add to release checks in the future.
Closing as not reproducible for now.