Analysis & Refactoring Tools

Lazlo Bonin (Lead Developer) 3 years ago updated 3 months ago 22 5 duplicates

Hi everyone! Because the requests for graph analysis and refactoring tools come in often, I've decided to start a discussion thread for them. This is one of the areas in which new tools / panels / windows could be developed for Bolt, but I haven't started the design process at all, and I want feedback and input from the community.

Here are some of the requests I've seen so far:

  • Rename variable
  • Rename event
  • Custom console to auto-focus to error node
  • Warnings overview list
  • Find all usages of macro

What other analysis / refactoring tools would you like to see?

Note: this discussion is unrelated to code refactoring (e.g. renaming your types or members). For this, see this thread instead: Refactoring attribute(s).

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

Duplicates 5

Under Review

Sorry for the late reply on this. This is definitely a feature I had on my mind for a while. Or rather: a more complete set of features for code analysis, search and refactoring. There is no time frame for it yet, but it's something I'd like to take the time to think about and design properly to a whole "toolset" to Bolt in that way.


Interesting idea! That's part of what I would call "analysis & refactoring tools", and I've started an idea thread to discuss them here: https://support.ludiq.io/communities/5/topics/1152-analysis-and-refactoring-tools


"What other analysis / refactoring tools would you like to see?"

1) An enhanced Graph Inspector, which displays all currently used and/or visible units in the current graph.

2) Easy switch between multiple State Machines/Flow Machines on the same Gameobject, maybe this can be summed up as a hierachical view with point 1 like

[State Machine (1)]

|-> MyState1

|-> MyState2

|--> MySuperUnit1

[State Machine (2)]

|-> MyState1

Very interesting idea! I love the "graph hierarchy" view, but would you really ever need to see all nodes in the graph? For example, what's the point of seeing a bunch of branching and math nodes in the hierarchy? How would that help you navigate to them faster than actually zooming out?

I guess showing the states would be enough at first.. and I would come back to this if there is a need for every single node


I would like to quickly see what macros with filenames and what variables are used in selected graph or even in the scene. The reason is that the way I work, I usually make few draft version of the graph, macros and variables. When I get that to work, I try to clean up graphs, variables and macros but it can be hard to see which are relevant/used anymore.

The other thing is that overall the macros are very powerful, but in more complicated graphs it can be hard to keep track / organize them with just filename and folder to work on (you can't even see the folder when you add it to graph using right mouse button). Maybe more metadata would help, something like simple namespace would help, so you could make groups and subgroups. Like "movement/enemy" could be added to macro and then you could see macros in hierarchies when you add one in the graph. I know Bolt is supposed to be easy to use and I like it. So no actual namespace but something where I can sort macros in hierarchies and they show up in those in fuzzy finder instead of listing all macros in one list.


Great suggestion, this has been on my mind for awhile. I also would love better organizing of Macros. Right now for easier searching, I name my macros like they include dotted namespaces, works great, but not as easy to navigate if you don't know exactly what you're looking for.

I'd like to search for anything I could search for in text based code. Old graphs and graphs by others aren't as self documenting as one would wish for. You need to know where a certain variable was used if you want to find bugs or refactor the code/graph.
The UX could be similar to the fuzzy finder but with a bit more bells and whistles.
Checkboxes (or better?) to select what you want to search: units, groups (titles + descriptions), variables, transitions, ...
Then you type into a search field and the result is a list of breadcrumbs to the unit (or group, etc.) With the current breadcrumbs as we know them and maybe the first unit of a flow like "... Update > ... > [keyword]" so you know it is in the Update part of the graph.
Perhaps you have a complex graph and need to do multiple things with an object your player collided with. You are looking for the variable "CollidedWith" and you get
  • Player > Running > On Exit State > ... > Set Object Variable "CollidedWith"
  • Player > Standing > (Transition)Had collision > Update > ... > Get Object Variable "CollidedWith"
The search window needs to stay until you close it yourself so that you could return and look at the search result again and choose a different result or have an overview over the use of a variable or super unit. Ideally floating even over expanded (shift+space) graphs. Nice to have: You could shrink the result so it isn't blocking the current view. And then you expand it again to see the other results.
Saving a search could be a nice feature, too.
If Bolt would gain comment units one could even use the popular "XXX" and "TODO" comments and fix parts of the graphs later.

Clicking on a search result brings you to the graph and highlights (and centers) the unit you are looking for.

This... Is actually a great idea, with a couple caveats. It would have to be via search result (as you mentioned in your suggestion), and you'd have to be prepared to click through multiple to find which one you're after, as many units will share the same name (i.e. Macros used multiple times in a graph, let alone a project). One way to mitigate that would be to show the relative tree path for that unit, but it wouldn't eliminate the issue, as you can have multiple such units in the same graph you're scoped to. Also, it would only really work with the nested type units, (i.e. Super Units), and their respective Flow/State machines. 

But other than that, I could see this being a very useful feature.

Graph Inspector: Machine I/O Node Creator.

Did a quick search, didn't find anything, so I hope this isn't a repost.

Just a thought I had while refactoring graphs into multi-machine graphs; it's really nice and easy to create Control I/O and Value I/O options in the Graph Inspector. What would really take it that extra mile though, is to be able to drag and drop a configured I/O option from the Graph Inspector, and onto the Graph.

Just thinking one step further, and this may be an excessive idea, but it's an interesting one. (And I realize this can already be done with events, but this way may be more appealing)

This idea could be extended, with some changes to the way Input and Output nodes are handled in a Machine, to support multiple Input and Output nodes. Particularly Output nodes, as that could provide some neat contextual flow from graph to graph, without having to fall back on event triggers. Additionally, with the way the Graph Inspector is already set up for configuring I/O nodes, this way could be easier and more resilient to user error (an example being a misspelled or miscapitalized event string).

And just thinking about it, I think having a drag and drop interface may be ideal in some cases, but for those who don't like that method, it could be set up in a similar fashion to the ways variable nodes are implemented; the same node to select from the fuzzy finder, but a drop down menu on the node to select between the configured options for that machine.

I agree! If graph is very large, searching by typing and then marking all nodes that has typed characters would be great!

Under Review

How would you propose this would look and work?

Would nodes in the graph be highlighted? Would the graph be zoomed out to find the results?

Should you only look in node titles, or also subtitles, surtitles, port names?

Thanks for answering.

Graph node is highlighte will very helpful


I guess this would be a great place for Search button. When pressed, pop-up box appears where you type and everything that matches your symbols gets highlighted. So you can easily find everything in a large graph and zoom in quickly to the stuff you need


The search function could activate the overview and dim everything that is not included in the search. 


Any chance to prioritize these features? Specifically searching for nodes?

As my project grows bigger, it becomes more and more of a problem to not be able to find usage of certain functions / nodes, and it can cause maintenance a bit hellish.


Hi Kingblade! We feel your pain but unfortunately we were unable to prioritize search tools. The reason is that for project-wide search to work, we need to obsolete root embed graphs. This will happen in Bolt 2 (currently in development), so we'll be able to see Search & Replace tools soon after. Sorry, hang in there!


(Sorry for the bump/necro, I'm doing some roadmap grooming following the Unity acquisition!)

This is now supported in Bolt 2 via renamable class graphs / variables and graph pings.