+1
Fixed (Unreleased)

2.0.0a6 Invalid code generation for state transition constructors

Ex-Crow 12 months ago updated by Jeremy TAN 8 months 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:
2.0.0a6
Unity Version:
2019.2.15
Platform(s):
PC
Scripting Backend:
Mono
.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)

Hi,

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#

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

```csharp
public To(TurnManager self, IGeneratedStateTransition transition)
```