0
Fixed

2.0.0a7 Duplicate Casting in generated C#

MegaMiley 10 months ago updated by Lazlo Bonin (Lead Developer) 10 months ago 2 1 duplicate

When trying out the cleaner connection between variables inside vertical nodes I came across the issue that the generated C# script could create a double casting of the variable type. This would obviously cause errors when compiling the code.

To reproduce, all I did was hold CMD whilst dragging the value output from GetComponent into SetMyRigidbody, the extra node in front was added by Bolt and might be causing the issue.

https://media.discordapp.net/attachments/376115450314096653/669092454674202674/Screenshot_2020-01-21_at_10.14.14.png

https://cdn.discordapp.com/attachments/376115450314096653/669095914668818452/Screenshot_2020-01-21_at_10.27.28.png

Bolt Version:
2.0.0a7
Unity Version:
2018.4.14f1
Platform(s):
macOs
Scripting Backend:
IL2CPP
.NET Version (API Compatibility Level):
.NET 4.x
Bolt 2

Duplicates 1

Fixed (Unreleased)

Hi MegaMiley,

Thanks for the report.

This will be fixed in the next version.

I also fixed the issue where the Type overload of GetComponent was not supported in code generation.

Just FYI, you can omit the entry and exit flow for pure functions like GetComponent, which makes for a very compact graph:

https://imgur.com/HN6vM4m