All Releases
Bolt v.2.0.0a4
Alpha
2019-04-03

Thank you for helping us test Bolt 2!

Alphas are frequent unstable preview releases. Each alpha will add new features towards the final featureset of Bolt 2. You can learn more about Bolt 2 in our Blog Post, our Design Document or our Roadmap.

Do not use Bolt 2 alphas in production projects.
These releases are unstable, untested, and prone to multiple breaking changes in the future.

Alpha 4 is compatible with Bolt 1 projects!
Legacy macros, machines and variables will display as missing. To fix them:

  1. Run Tools > Ludiq > Fix Missing Scripts...
  2. Restart Unity (important!)

Alpha 4 includes many core changes that may break the conversion process. We'd appreciate your help to test conversions from existing Bolt 1 projects, big and small. But please DO NOT import your main Bolt 1 project. Always test on a copy.


What's new in Alpha 4

Odin Serializer

The underlying serialization engine was switched from FullSerializer to Odin Serializer.

This might seem like a technical detail, but in fact it's a major improvement. Serialization is used for loading, saving, copying, extracting and much more. FullSerializer was a powerful serializer, but it is extremely slow. The newly open-sourced Odin Serializer, while just as powerful, is much faster.

In fact, OS is often 4-6x faster than FS and generally much leaner on memory. With this change, you can expect a much more responsive Bolt experience overall, both in builds and in the editor.

Switching to Odin was part of our optimization effort to increase the initialization speed of Bolt. Starting in Alpha 4, you should notice much shorter delays when entering play mode, compiling, or launching a build.

Unfortunately, Prefab Overrides are not yet available with Odin in Alpha 4.

They will be fully supported in Alpha 5.

This is a major core change that was very complex to accomplish without breaking existing graphs. Please report any bug you encounter with the new serialization engine, especially anything related to data loss or corruption.


Generics

Bolt now fully supports generic types and methods out of the box.

Generics let you specify the type of values you want to deal with in some contexts. For example, if you have a generic list, you can specify the type of the elements in that list. For more information, see Generics in .NET.

This is most useful for Lists and Dictionaries. The strongly typed List<T> and Dictionary<TKey, TValue> are now the recommended way of handling collections. Goodbye, AotList, AotDictionary, IList, IDictionary, ArrayList, etc.!

Generics might seem complicated or intimidating, but they're pretty easy and intuitive to use in Bolt. After choosing a generic type, simply use the dropdowns to complete the definition. Then, Bolt will reuse that definition for all contextual options pulled from the port.


Reflected Events

Every event in your C# codebase is now available out of the box, without the need for any special integration.

This includes events in the Unity engine, third-party plugins, and custom user scripts.

Devenv 2019 04 03 15 59 50
1. Define any event in any class using the "event" keyword. Make sure to run a Fast Extract after modifying a class.
2019 04 03 15 56 10
2. Your events will show up directly in the fuzzy finder for that class.
Unity 2019 04 03 15 57 59
3. Reflected events work exactly like built-in Unity events: they're tinted green and pass their arguments as outputs.

Delegates

You can now create and invoke delegates of any type from Bolt graphs.

Delegates are functions that you pass around like values. They're a bit more advanced as a C# feature. For more information, see: Delegates - C# Programming Guide.

On one hand, creating a delegate allows you to specify how a given action should be handled. On the other hand, invoking a delegate allows you to let some other part of the program decide how an action should be handled.

To invoke a delegate, simply search for its signature in the fuzzy finder. Generic delegates like Action<> and Func<> are also supported. If you choose a generic delegate, you'll need to specify the generic arguments.

For this example, we'll create a simple float predicate: something that analyzes a float, and returns a boolean result. We'll use the Func<T>(obj) delegate for that purpose.

2019 04 03 16 09 10
1. Choose a delegate signature from the fuzzy finder.
Unity 2019 04 03 16 10 49
2. Choose the generic arguments for the parameter and the result, in this case, Float and Boolean.
Unity 2019 04 03 16 11 10
3. Once closed-constructed, the unit will become compact and ready to use.

To create a delegate handler, you need to drag a contextual connection from an existing delegate port (identified by little return arrows). Bolt will automatically suggest the matching delegate type as the first option.

The delegate unit uses ports to forward parameters and return values.

  • If parameters are passed, they will show up as output ports.
  • If a return value is required, it will show up as an input port.

You can connect a control output for the body of the delegate if you want, but it's not required.

Unity 2019 04 03 16 13 34
1. Create a delegate handler from the contextual menu.
Unity 2019 04 03 16 14 44
2. Build your delegate logic as you wish. Here, we check that the input float is greater than zero.
Unity 2019 04 03 16 15 23
3. In the complete example, we pass 5 to our delegate, which will return and print True, because 5 > 0.

Fuzzy Finder Improvements

The fuzzy finder was further improved in Alpha 4.

Firstly, it has been massively optimized and displays categories and search results almost instantly.

Secondary Icons were also added to allow a quick parsing of the result of a node. For example, getting the Light: Get Color will also show a string icon, because the color property is a color. Likewise, operator units now show the icons of their operands on each side.

Separator Groups were also added to improve the organization of categories and suggestions. They should help you quickly jump to the type of node you're looking for, or help you figure out why Bolt is suggesting a contextual option.

Finally, World Delimited Search allows you to use acronyms to filter for options more efficiently by using uppercase characters or whitespace.

For example, if you know you're looking for On Keyboard Input, typing OKI or o k i will filter results much more aggressively and efficiently than oki.


Graph Pings

The new Graph Ping system allows Bolt to quickly jump to any specific element in any graph in the project. This is especially useful for debugging.

Pings will be triggered when:

  • An error thrown from a graph is selected in the console
  • A Debug.Log written from a graph is selected in the console
  • When a breakpoint is reached
  • The code generation error is clicked from the code preview window

New Coroutine Workflow

Unity 2019 04 03 17 21 34
Start coroutines from anywhere.

We redesigned the coroutine workflow from the ground up in Alpha 4.

With the new Coroutine unit, coroutines can be created and started at any point in the flow. Previously, you could only start a coroutine at a root event.

This is especially useful for Timer and Cooldown units, which previously couldn't start a coroutine after their On Complete ports. Now, this is entirely supported.

The new Coroutine unit also lets you configure whether you want to Start the coroutine immediately (enabled by default), or just create it for use later.

If you decide to start it from the unit, you can also configure the Auto-Stop behaviour for each coroutine. When enabled, auto-stop will stop the coroutine when the current graph stops listening. That happens when the parent state or transition is exited, or when the owner component is disabled. Previously, auto-stop was always enabled.

In either case, the Coroutine unit will output the created IEnumerator or Coroutine object so that you can use it with the Unity API. For example, this lets you call StartCoroutine manually if you disabled start, or call StopCoroutine manually if you disabled auto-stop.

Unity 2019 04 03 17 17 19
Let Bolt do the grunt work with auto-start and auto-stop
Unity 2019 04 03 17 17 24
... or use the Unity API yourself for more granular control.

As you noticed from the previous screenshots, the Coroutine Flow is now properly recognized by Bolt, which displays it as a double-line to indicate that it's happening in parallel. Ports that require a coroutine to run will now also display as a double-arrow, and warn you if the incoming flow isn't a coroutine:

Unity 2019 04 03 17 24 23
Warning when trying to call a Wait unit outside of a coroutine.
Unity 2019 04 03 17 24 44
Fixed!

Additionally, two new units were introduced for advanced coroutines.

Wait for Instruction lets you wait for any yield instruction, including async operations. For example, this lets you wait for a scene to finish loading before going forward in a coroutine.

Wait for Coroutine lets you create nested coroutines by combining it with the Coroutine unit with Start disabled.

Unity 2019 04 03 17 27 38
Async operations
Unity 2019 04 03 17 29 07
Nested coroutines

Last but not least, for convenience, the contextual suggestions for control ports will include all Wait units if Bolt detects the current flow is a coroutine:


Connection Improvements

The UX for connections was completely rethought for Alpha 4.

Connections are now first-class graph elements that can be individually highlighted, selected, and deleted.

Deleting is no longer done by right-clicking either end port of a connection. Instead, you have 3 options:

  • Select one or more connection(s), then hit Delete / Cmd+Backspace OR
  • Context-click the connection, and choose Delete OR
  • Hold Alt and right-click the connection

    Because connections now have detection and context menus, a lot of new secondary actions were added.

    For example, you can now Convert a connection to a proxy, or vice versa:

    Speaking of proxies, a new preference lets Bolt automatically detect when a new connection would be twisted, and choose to create it as a proxy instead (enabled by default). Another nail in the coffin of spaghetti graphs!

    Two new toggles were also added to connections: Enabled (on by default) and Breakpoint (off by default).

    Disabling a connection will keep it in place, but will make Bolt pretend it doesn't exist at all. This is useful for temporarily disabling sections of your graph in a non-destructive way.

    Enabling a breakpoint on a connection will throw a special exeption and pause the editor immediately when that connection is traversed. Clicking the breakpoint in the console will ping the associated connection so you can inspect the state of the graph at the exact moment of the breakpoint.

    The new Insert Unit action lets you place a unit in the middle of an existing connection that will get connected on both ends. The contextual suggestions therefore take into account both sides of the existing connection to present you with the most relevant options.

    Last but not least, this new insertion feature is also enabled when creating connection between incompatible types. Use it to let Bolt help you figure out how to convert from a given type to another, for example from Float to Vector 3:


    Assign & Convert Units

    With Bolt 2 becoming more and more type-safe, we're introducing two new utility units for dealing with temporary values.

    The Assign unit lets you create a temporary variable that only lives on the current flow. You can reuse assignments with the same name as long as their types match. To fetch the assigned value later, simply use a proxy from the output of any assign unit with that name (it doesn't have to be the last one).

    Assign is the replacement for Flow Variables, which are getting deprecated in Bolt 2. Unlike Flow Variables, the Assign unit is strongly typed. It is also much faster and leaner in generated C# code.

    The Convert unit is an advanced unit that lets you force a conversion to a given type. Don't worry, Bolt 2 still handles conversions for you behind the scenes so you don't have to worry about them, and that's not changing. In 99% of cases, you won't need the Convert unit at all. But in certain edge cases, early conversions are useful to enforce type safety at a predictable point in the logic (following the "fail-early" design principle). It also lets you benefit from better contextual options.


    Fixes

    Most bugs reported in Alpha 3 were fixed.

    See the changelog below for the full list of changes!


    How to install

    Bolt 2 requires Unity 2018.3 or above with the .NET 4.x API Compatibility Level.

    1. Download Unity 2018.3
    2. Create a new project
    3. Open Edit > Project Settings...
    4. Select the Player tab, scroll down to Configuration
    5. Set Scripting Runtime Version to .NET 4.x Equivalent
    6. Set Api Compatibility Level to .NET 4.x
    7. Download and import Bolt
    8. Restart Unity (Important)
    9. Follow the Setup Wizard
    10. Open the Bolt windows under Window > Bolt

    If you get errors and missing textures like these, you forgot to restart Unity at step 8.


    How to update

    If you already have a Bolt 2 Alpha installed:

    1. Overwrite the files with the new package
    2. Open the extractor (Tools > Bolt > Extractor...)
    3. Click Reset to include new default types like Delegate
    4. Run a Full Extract

    How to report bugs

    You can report bugs for Bolt 2 alphas in the Forum as usual.

    Make sure your bug report has:

    • The Bolt 2 tag checked (important!)
    • Bolt, Unity and .NET versions indicated
    • Stack trace of the error, if any.
      For realtime C# preview, click the message to log the stack trace to the console.
    • Reproduction steps or graph screenshots, if applicable.

    The easiest and best way to help us reproduce your bug report is to use the new Graph Share Tool in the top right toolbar.


    Changelog

    Ludiq Core
    Added
    Odin Serializer to replace FullSerializer
    Ludiq Core
    Added
    Generics, Indexers and Events to core reflection library
    Ludiq Core
    Added
    Integration with new Project Settings and Preferences windows
    Ludiq Core
    Added
    Support for multiple icons and separators in fuzzy finder
    Ludiq Core
    Optimized
    Plugin container initialization
    Ludiq Core
    Optimized
    Core reflection library
    Ludiq Core
    Optimized
    Fuzzy finder options population
    Ludiq Core
    Fixed
    XML Documentation that included tags
    Ludiq Graphs
    Added
    Graph Pings that can focus on any specific graph element
    Ludiq Graphs
    Added
    Relevant code generation error messages
    Ludiq Graphs
    Added
    Graph ping when on code generation errors
    Ludiq Graphs
    Added
    Full Code mode to code preview window
    Ludiq Graphs
    Added
    Tuple, generics and lambda support to code generation
    Ludiq Graphs
    Fixed
    Clipboard error when context-clicking canvas background
    Bolt Core
    Changed
    Renamed Bolt namespace to Ludiq.Bolt to avoid conflicts with Photon Bolt
    Bolt Flow
    Added
    Generics support to reflected units
    Bolt Flow
    Added
    Delegate Units
    Ludiq Graphs
    Added
    Reflected Event Units
    Bolt Flow
    Added
    Indexer Units
    Bolt Flow
    Added
    Assign Unit
    Bolt Flow
    Added
    Convert Unit
    Bolt Flow
    Added
    Coroutine Unit
    Bolt Flow
    Fixed
    Wait for Instruction Unit
    Bolt Flow
    Changed
    Wait for Coroutine Unit
    Bolt Flow
    Added
    Coroutine flow analysis
    Bolt Flow
    Added
    Coroutine flow indicator
    Bolt Flow
    Added
    Per-connection Enabled toggle
    Bolt Flow
    Added
    Per-connection Breakpoints
    Bolt Flow
    Added
    Graph ping on runtime errors
    Bolt Flow
    Added
    Graph ping on Debug.Log* calls
    Bolt Flow
    Added
    Generic List<T> and Dictionary<TKey, TValue> to default types
    Bolt Flow
    Added
    Word delimiter support to search algorithm
    Bolt Flow
    Added
    Selection support to connections
    Bolt Flow
    Added
    Action to convert between proxies and connections
    Bolt Flow
    Added
    Action to insert unit in existing connection
    Bolt Flow
    Added
    Insertion of converter units when connecting incompatible ports
    Added
    Relations inferral to super units
    Bolt Flow
    Added
    Additional icons to unit options fuzzy
    Added
    Separators to unit options fuzzy
    Bolt Flow
    Added
    Option to automatically create proxies for connections that would be twisted
    Bolt Flow
    Optimized
    Unit options fuzzy finder
    Bolt Flow
    Fixed
    Various code generation errors
    Bolt Flow
    Fixed
    Missing literal and primitive options
    Bolt Flow
    Changed
    Renamed Control category to Flow
    Bolt Flow
    Removed
    Non-generic collection units
    Bolt Flow
    Removed
    Coroutine option on events
    Bolt Flow
    Removed
    Per-unit breakpoint

    Bolt v.2.0.0a3 Changelog

    Bolt Flow
    Added
    Tweening (powered by DOTween)
    Bolt Flow
    Added
    Smart Contextual Options
    Bolt Flow
    Added
    Strongly-Typed Operators
    Bolt Flow
    Added
    Bitwise Operators
    Bolt Flow
    Added
    Literal Creation from the fuzzy finder
    Bolt Flow
    Added
    Unit port definition options for Allows Null, Null Means Self and Primary
    Bolt Flow
    Added
    C#-like copy-by-value semantics for value types
    Bolt Flow
    Added
    Default true value for Branch condition
    Bolt Flow
    Added
    Nested graph inspector to super unit inspector
    Bolt Flow
    Added
    Double-click Graph Input or Output to go to parent graph
    Bolt Flow
    Added
    Port to Super Unit promotion
    Bolt Flow
    Changed
    Hide Get verb label on unit titles for compactness
    Bolt Flow
    Removed
    Obsoleted all previous operator units
    Bolt Flow
    Fixed
    Port proxy carry behaviour #2497
    Bolt Flow
    Fixed
    MSBuild path detection #2491
    Bolt State
    Added
    State Re-Entry Option
    Bolt State
    Changed
    Any State exit behaviour to be recursive
    Ludiq Graphs
    Added
    Graph Sharing
    Ludiq Graphs
    Added
    Node Collapsing
    Ludiq Graphs
    Added
    Redesigned Toolbar
    Ludiq Graphs
    Added
    Graph Inspector Popup
    Ludiq Graphs
    Added
    Warnings display on hover
    Ludiq Graphs
    Fixed
    Support for resizing graph elements while zoomed out
    Ludiq Graphs
    Changed
    C# Preview font to improve type-hinting
    Ludiq Core
    Added
    Breadcrumbs to fuzzy window
    Ludiq Core
    Added
    Category search in fuzzy window
    Ludiq Core
    Added
    Script reference resolution for all Bolt 1 scripts
    Ludiq Core
    Added
    Options panel to Extractor
    Ludiq Core
    Added
    Nested types inclusion for hierarchical type extraction
    Ludiq Core
    Added
    Nested type icons now use fallback to their parent type
    Ludiq Core
    Changed
    Merged AOT Pre-Build in Generation process
    Ludiq Core
    Optimized
    General search and option fetching speed
    Ludiq Core
    Fixed
    Fuzzy Finder rendering glitches

    Bolt v.2.0.0a2 Changelog

    Bolt Flow
    Added
    Vertical Flow
    Bolt Flow
    Added
    Compact Units
    Bolt Flow
    Added
    Port Proxies
    Bolt Flow
    Added
    Breakpoints
    Bolt Flow
    Added
    Smart Carry
    Bolt Flow
    Added
    Drag Port to Input / Output
    Bolt Flow
    Added
    C# Preview for Super Units
    Bolt Flow
    Added
    Default Flow Macro Presets
    Bolt Flow
    Added
    Keyboard shortcut to reveal Proxies and Relations (Alt)
    Bolt Flow
    Added
    Double-click Graph Input or Output to go to parent graph
    Bolt Flow
    Fixed
    Implicitly typed variables in generated C# for input events #2415
    Bolt Flow
    Fixed
    Various formatting issues in generated C# #2419
    Bolt Flow
    Fixed
    Generated C# wrapping not updating when resizing preview window
    Bolt Flow
    Fixed
    Added a time-out recovery code for C# preview generation #2413
    Bolt Flow
    Fixed
    Error in generated C# for Once unit #2422
    Ludiq Graphs
    Added
    Snapping
    Ludiq Graphs
    Added
    Group Comments
    Ludiq Graphs
    Fixed
    Graph scripts folder not getting created automatically
    Ludiq Graphs
    Changed
    Focus keyboard shortcut from Home to F
    Ludiq Graphs
    Removed
    Snap to Grid

    Bolt v.2.0.0a1 Changelog

    Bolt Core
    Added
    C# Script Generation for Flow and State Graphs
    Bolt Core
    Added
    Realtime C# Preview Window (Window > Bolt > C# Preview)
    Bolt Core
    Added
    Runtimes: Live, Generated, Hybrid
    Bolt Core
    Added
    Workflow Toolbar (Window > Bolt > Toolbar)
    Bolt Core
    Added
    Extractor Window (Tools > Bolt > Extractor...)
    Bolt Core
    Added
    Bulk Type, Namespace and Assembly Extraction
    Bolt Core
    Added
    Fast (Incremental) Extraction
    Ludiq Core
    Added
    Odin Serializer Dependency
    Ludiq Core
    Added
    Layout Swapping Hotkeys (Ctrl/Cmd+Space)
    Ludiq Core
    Added
    Unity Message Proxies
    Ludiq Core
    Added
    VectorXInt Support
    Ludiq Graphs
    Added
    Node Deselection
    Bolt Flow
    Added
    Overloads Context Menu Item
    Bolt Flow
    Added
    Fuzzy Finder Hotkey (Space)
    Bolt Flow
    Added
    Numeric Negation Operators
    Bolt Flow
    Added
    On Particle Trigger Event
    Ludiq Core
    Changed
    Folder Structure
    Changed
    Grouped Window Menu under Bolt
    Bolt Core
    Optimized
    Extraction Speed
    Bolt Core
    Optimized
    Loading Speed of extracted data
    Ludiq Graphs
    Removed
    Graph Window Sidebars