Search Issue Tracker
Fixed
Votes
0
Found in [Package]
2.0.0a10
Issue ID
UVSB-693
Regression
No
2.0.0a10 Using type in global namespace as variable type breaks code generation
[Original Issue Link|https://support.ludiq.io/communities/5/topics/4984-200a10-using-type-in-global-namespace-as-variable-type-breaks-code-generation] - Confirmed by Lazlo
----
Hi there, When using a Custom Class as a variable type in my Bolt Component, I can't generate or preview C# script and I get this error:
!screenshot-1.png|thumbnail!
Error Message:
{code:java}
ArgumentNullException: Value cannot be null.
Parameter name: name
Ludiq.EnsureThat.IsNotNull (System.String value) (at Assets/Ludiq/Ludiq.Core/Runtime/Ensure/EnsureThat.Strings.cs:47)
Ludiq.CodeDom.CodeUsing..ctor (System.String name) (at Assets/Ludiq/Ludiq.Core/Editor/CodeDom/Nodes/CodeUsing.cs:7)
Ludiq.Bolt.BoltGenerationUtility.AddNamespaces (Ludiq.Bolt.HybridType type, Ludiq.Bolt.DocumentGeneration document) (at Assets/Ludiq/Bolt.Core/Editor/Generation/BoltGenerationUtility.cs:55)
Ludiq.Bolt.BoltClassVariableGenerator.GenerateProperty (Ludiq.Bolt.PropertyGeneration property) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generators/BoltClassVariableGenerator.cs:88)
Ludiq.Bolt.PropertyGeneration.GenerateDeclaration () (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/PropertyGeneration.cs:18)
Ludiq.Bolt.MemberGeneration`1[TDeclaration].Ludiq.Bolt.IMemberGeneration.GenerateDeclaration () (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/MemberGeneration.cs:32)
Ludiq.Bolt.CompositeGeneration`1+<>c[TDeclaration].b__26_0 (Ludiq.Bolt.IMemberGeneration m) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/CompositeGeneration.cs:162)
System.Linq.Enumerable+SelectIListIterator`2[TSource,TResult].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) (at <437ba245d8404784b9fbab9b439ac908>:0)
Ludiq.Bolt.BoltClassGenerator.GenerateDeclaration (Ludiq.Bolt.ClassGeneration classGeneration) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generators/BoltClassGenerator.cs:100)
Ludiq.Bolt.ClassGeneration.GenerateDeclaration () (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/ClassGeneration.cs:25)
Ludiq.Bolt.TypeGeneration`1[TDeclaration].Ludiq.Bolt.ITypeGeneration.GenerateDeclaration () (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/TypeGeneration.cs:11)
Ludiq.Bolt.DocumentGenerator.Generate (Ludiq.Bolt.DocumentGeneration generation) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generators/DocumentGenerator.cs:64)
Ludiq.Bolt.DocumentGeneration.Generate () (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/DocumentGeneration.cs:33)
Ludiq.Bolt.RootGeneration.Generate () (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/RootGeneration.cs:106)
Ludiq.Bolt.RootGeneration.GenerateAndWrite (Ludiq.CodeDom.ICodeWriterSystem writerSystem) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/RootGeneration.cs:128)
Ludiq.Bolt.CodePreviewWindow.Generate () (at Assets/Ludiq/Bolt.Core/Editor/Generation/CodePreviewWindow.cs:442)
UnityEngine.Debug:LogException(Exception)
Ludiq.Bolt.CodePreviewWindow:OnFailureGUI() (at Assets/Ludiq/Bolt.Core/Editor/Generation/CodePreviewWindow.cs:409)
Ludiq.Bolt.CodePreviewWindow:_OnGUI() (at Assets/Ludiq/Bolt.Core/Editor/Generation/CodePreviewWindow.cs:304)
Ludiq.LudiqEditorWindow:OnGUI() (at Assets/Ludiq/Ludiq.Core/Editor/Windows/LudiqEditorWindow.cs:140)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
{code}
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
- Only the left screen is rendering when using Render Graph Fullscreen Blit in Meta Quest 2
- Context menu with the "Revert" option doesn't appear when pressing the right mouse button on a "Vector2" or "Vector3" property in the Inspector of a custom shader
- Missing Render Feature "Full Screen Pass Render Feature" in any “Universal Renderer Data” asset when upgrading from 2022.3
- Inconsistent ParticleSystemVertexStream.PercentageAlongTrail data range in Trail Texture Modes except "Stretch"
- The Graph Debug Window can be right clicked through and the Node Workspace is manipulated instead
Resolution Note:
Using custom types in the global namespace no longer breaks code generation