0
Fixed

2.0.0a9 - InvalidOperationException when adding PlayerInput events (C# Generation error)

David Svezhintsev 7 months ago updated by Lazlo Bonin (Lead Developer) 7 months ago 2

If you add PlayerInput event, for example OnDeviceChange event, this is the error you will get:

InvalidOperationException: Cannot add alias 'ValueOutput#%obj' to handle '%obj' because the handle is not reserved. Consider using Reserve instead.
Ludiq.Bolt.AliasedHandlePool`2[TAlias,THandle].Alias (TAlias alias, THandle handle) (at Assets/Ludiq/Bolt.Core/Editor/Generation/AliasedHandlePool.cs:39)
Ludiq.Bolt.MethodBaseGeneration`1[TMethod].AliasLocal (System.Object alias, System.String local) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/MethodBaseGeneration.cs:98)
Ludiq.Bolt.MemberEventGenerator.DeclareMembers (Ludiq.Bolt.ClassGeneration class) (at Assets/Ludiq/Bolt.Flow/Editor/Units/Codebase/MemberEventGenerator.cs:43)
Ludiq.Bolt.FlowGraphGenerator`1[TFlowGraph].DeclareGraphMembers (Ludiq.Bolt.ClassGeneration class) (at Assets/Ludiq/Bolt.Flow/Editor/Generation/FlowGraphGenerator.cs:47)
Ludiq.Bolt.FlowBehaviourGenerator.Declare (Ludiq.Bolt.ClassGeneration class) (at Assets/Ludiq/Bolt.Flow/Editor/Generation/FlowBehaviourGenerator.cs:40)
Ludiq.Bolt.BoltClassGenerator.Declare (Ludiq.Bolt.DocumentGeneration document, Ludiq.CodeDom.CodeTypeReference reference) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generators/BoltClassGenerator.cs:65)
Ludiq.Bolt.BoltTypeGenerator`2[TType,TGeneration].Ludiq.Bolt.IRootTypeGenerator.Declare (Ludiq.Bolt.DocumentGeneration document, Ludiq.CodeDom.CodeTypeReference reference) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generators/BoltTypeGenerator.cs:46)
Ludiq.Bolt.RootGeneration.DeclareType (Ludiq.Bolt.BoltType type) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/RootGeneration.cs:59)
Ludiq.Bolt.RootGeneration.Type (Ludiq.Bolt.BoltType type) (at Assets/Ludiq/Bolt.Core/Editor/Generation/Generations/RootGeneration.cs:70)
Ludiq.Bolt.CodePreviewWindow.Generate () (at Assets/Ludiq/Bolt.Core/Editor/Generation/CodePreviewWindow.cs:441)
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)
Bolt Version:
2.0.0a9
Unity Version:
2019.3.2f1
Platform(s):
Windows
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET 4.x
Bolt 2