Add Method Overrides to Bolt 2

abrownbag 2 years ago updated 2 years ago 4

As the title suggests it would be amazing if I could specify a custom event as a method override in bolt 2 so I can use things like photon networking right out of the box with bolt.

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Bolt 2
Satisfaction mark by abrownbag 2 years ago

Hi abrownbag!

Thanks for the suggestion. Unfortunately that's not going to be possible with Bolt 2's class system, as it doesn't allow using existing C# classes as base classes. That's a design that's unfortunately incompatible with live editing.

ahh damn gotcha!

So when I make a custom bolt 2 even the c# preview window shows it as: public void customName

Is this not actually the final generated code?

instead of using existing classes as base classes I was thinking more along the lines a drop down field on the current custom event node where if override is chosen it’ll just generate the method with the override keyword in front of it. 

It’s all good if not just something I was messing with the past few days!


It is the actual final generated code (with some stripping of the useless bits), but that is only one of the two ways in which Bolt graphs run. In hybrid or live runtime, the graphs don't run from script, they run from memory, so there's no C# involved at all. This is what lets you edit them while the game is running. So we can't keep this core feature and also allow class overrides, sorry.

ahh makes sense no problem!