0
Need More Information

2.0.0a8 Adding Component Class as an input to a Function breaks the graph

Ex-Crow 1 year ago updated by Reality.Stop() 11 months ago 3

Graph: https://imgur.com/nracReJ


Failed to define FlowFunctionUnit#a4f17...:
System.ArgumentException: Duplicate input for 'target' in Ludiq.Bolt.FlowFunctionUnit.
at Ludiq.Bolt.UnitDefinitionUtility.EnsureUniqueInput (Ludiq.Bolt.IUnit unit, System.String key) [0x00031] in C:\GameDev\alpha7_3\Assets\Ludiq\Bolt.Flow\Runtime\Units\UnitDefinitionUtility.cs:12
at Ludiq.Bolt.UnitDefinitionUtility.DefineValueInput (Ludiq.Bolt.IUnit unit, Ludiq.Bolt.ValueInputDefinition definition) [0x00012] in C:\GameDev\alpha7_3\Assets\Ludiq\Bolt.Flow\Runtime\Units\UnitDefinitionUtility.cs:97
at Ludiq.Bolt.Unit`1[TFlowGraph].ValueInput (Ludiq.Bolt.ValueInputDefinition definition) [0x00001] in C:\GameDev\alpha7_3\Assets\Ludiq\Bolt.Flow\Runtime\Units\Unit.cs:402
at Ludiq.Bolt.FlowFunctionUnit.Definition () [0x0009f] in C:\GameDev\alpha7_3\Assets\Ludiq\Bolt.Flow\Runtime\Units\Architecture\FlowFunctionUnit.cs:56
at Ludiq.Bolt.Unit`1[TFlowGraph].Define () [0x00041] in C:\GameDev\alpha7_3\Assets\Ludiq\Bolt.Flow\Runtime\Units\Unit.cs:188
UnityEngine.Debug:LogWarning(Object)
Ludiq.Bolt.Unit`1:Define() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Unit.cs:204)
Ludiq.Bolt.Unit`1:AfterAdd(FlowGraph) (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Unit.cs:96)
Ludiq.Bolt.MemberDefinitionUnit`2:AfterAdd(FlowGraph) (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/MemberDefinitionUnit.cs:93)
Ludiq.Bolt.GraphElement`1:Ludiq.INotifiedCollectionChild.AfterAdd(IGraph) (at Assets/Ludiq/Bolt.Core/Runtime/Graphs/GraphElement.cs:48)
Ludiq.ParentCollection`3:AfterAdd(IUnit) (at Assets/Ludiq/Ludiq.Core/Runtime/Collections/ParentCollection.cs:302)
Ludiq.ParentCollection`3:InsertItem(Int32, IUnit) (at Assets/Ludiq/Ludiq.Core/Runtime/Collections/ParentCollection.cs:91)
System.Collections.ObjectModel.Collection`1:Add(IUnit)
Ludiq.Bolt.FlowCanvas:AddUnit(IUnit, Vector2) (at Assets/Ludiq/Bolt.Flow/Editor/FlowCanvas.cs:218)
Ludiq.Bolt.FlowCanvas:PerformDragAndDrop() (at Assets/Ludiq/Bolt.Flow/Editor/FlowCanvas.cs:479)
Ludiq.Bolt.Canvas:HandleDragAndDrop() (at Assets/Ludiq/Bolt.Core/Editor/Canvases/Canvas.cs:2097)
Ludiq.Bolt.Canvas:HandleLowPriorityInput() (at Assets/Ludiq/Bolt.Core/Editor/Canvases/Canvas.cs:375)
Ludiq.Bolt.FlowCanvas:HandleLowPriorityInput() (at Assets/Ludiq/Bolt.Flow/Editor/FlowCanvas.cs:135)
Ludiq.Bolt.Canvas:OnGUI() (at Assets/Ludiq/Bolt.Core/Editor/Canvases/Canvas.cs:312)
Ludiq.Bolt.GraphWindow:_OnGUI() (at Assets/Ludiq/Bolt.Core/Editor/Windows/GraphWindow.cs:667)
Ludiq.LudiqEditorWindow:OnGUI() (at Assets/Ludiq/Ludiq.Core/Editor/Windows/LudiqEditorWindow.cs:136)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
Bolt Version:
2.0.0a8
Unity Version:
2019.2.19
Platform(s):
PC
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET 4.x
Bolt 2

Ah, my bad - it receives the Item Slot by default without needing the extra input created manually. I guess it doesn't like the second one. 


Need More Information

Hi TowerCrow,

Could you please post the steps to reproduce this?

Even though a target port is already available, a non-unique port key shouldn't be used and this is a bug

I think I hit this as well.  I'm not sure of the repro steps, but this is still alive as of A10.

I created this graph (there is nothing special) here



Trying to call this from another graph I get:



I recreated the function by literally copying the entire body of the function and rewired the inputs and outputs and it works.  The original function, however, still doesn't work and remains corrupted.