Run-time flow machine. Show as c# or even write c# and convert it to flow machine.

Lesha.VH 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 7

Lazlo, is it possible to make run-time version of plug-in?

Could you please say couple words how it should be done?

What thoughts to convert flow machine to c#, and c# code to flow machine?


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

Hi Lesha!

This is not a simple conversion, it's actually a very, very complex endeavor. As indicated on the roadmap, Bolt 2 is focused on converting flow and state machines to C# code. However, there are no plans to convert C# to Bolt graphs, because Bolt is a subset of the C# language.

Lazlo what about first question - RUN-time version of BOLT

What I mean:

For example I would like to teach children to program, and I will build android application (AOT)

1) Is it possible (in general) to make Flow and State machine in run-time on android?

2) As I understand AOT prebuild must prebuild all possible generics for reflection?

3) And for graph editor must be run-time solution (that substitute Editor classes) - does such approach will work?

Ah, I didn't understand that part of the question, sorry.

As you guessed, Bolt relies heavily on editor-only classes, both for GUI but also for a lot of storage, preferences, libraries, etc. It cannot be made into a runtime application. And you're right, if you wanted to do that for an AOT platform like mobile, Bolt simply cannot generate the code beforehand and couldn't run (unless you do an AOT generation for every single member in the unit options, which would be enormous).

Lazlo, I would like to make run-time version of bolt)

i think dependecies from Editor classes can be substituted with custom run-time implementation... or I am wrong?

the main problem as I undestand is AOT must be done for everything...

as I understand each generic generate dfferent code - List<float> and List<int> will be generated separetly?

Lazlo, how can I test aot for everything? option aot=full? enormous should be mesured)

what approach do you suggest if I would like to make visual scripting for run-time mobile platform? thanks!

I will not develop a runtime version of Bolt, however the source is available if you want to try to do that yourself. Fair warning though, it is a gigantic task. You can download the source from the bottom of this page:


There is no option for a full AOT pre-build at the moment, because it is not needed for the "editor version" of Bolt. Consider there are about 25 thousand options by default in Bolt, multiply that by ~ 10 lines of code, you get 250 thousand lines of code to be generated in C#, then compiled to C++ by IL2CPP. This is such a high number that I wouldn't be surprised if the compiler crashed due to lack of memory.

Lazlo, I am sorry to trouble you, but could you wrote 10 lines of code?

250k * 20 symbols = 5mb of code...

does link.xml solve problem to include everything for aot? thanks)

No, link.xml will not work, because Bolt needs generic optimizer types to be generated alongside the members.

As mentioned on the downloads page, I do not provide support for modifying the source, this is beyond the time and means I have. You can look at AotPreBuilder.cs to see how the stubs are generated, and start there to include more.