Fixed (Unreleased)

2.0.0a6 Invalid code generation for state transition constructors

Ex-Crow 2 years ago updated by Jeremy TAN 2 years ago 3 2 duplicates

Appeared after exiting Play mode. I created a new State graph before entering play mode.

Graph: https://imgur.com/VP9ivBu

[CompilerError] Argument 2:
cannot convert from 'Ludiq.Bolt.Generated.function' to 'Ludiq.Bolt.IGeneratedStateTransition'
Compiler Error at Assets\Ludiq.Generated\Transient\Scripts\function.cs:45 column 68
43:   startState = new GeneratedFlowState(new function.StartState(this), false);
44:   flowState = new GeneratedFlowState(new function.FlowState(this), false);
-->45:   startToFlowState = new function.StartToFlowState(this, this);
46:   startState.outgoingTransitions.Add(startToFlowState);
47:   flowState.incomingTransitions.Add(startToFlowState);
Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
.NET 4.x
Bolt 2

Duplicates 2

Working on Fix

Hi TowerCrow,

Thanks for the report. I've been able to confirm this, working on a fix.

Fixed (Unreleased)


This will be fixed in the next version.

Hi Lazlo,
I have a similar issue on bolt2.0.0a10, just to check before the next release

error CS1503: Argument 2: cannot convert from 'Ludiq.Bolt.Generated.TurnManager.TurnManager' to 'Ludiq.Bolt.IGeneratedStateTransition'

here the line in error in the generated C#

 to = new TurnManager.To(this, this);
to1 = new TurnManager.To1(this, this);
and the related Constructor

public To(TurnManager self, IGeneratedStateTransition transition)