Graph Snippets - RealityStop/Bolt.Addons.Community GitHub Wiki

Graph Snippets

Quickly insert code snippets with parameters using the fuzzy finder. Format: Name,Parameter1,Parameter2, ... and press Tab to add it to the graph. Examples: Debug, Vector2/3 Creation, SetPosition, InOutSubgraph, IsNull.

There are 2 types of snippets ControlSnippet and ValueSnippet Control Snippets can only be used when creating a connection from a control output and Value Snippets can only be used when creating a connection from a ValueInput.

Notes

  • You can only use literal values.
  • You do not need to type the full name of the snippet it will try and find the most relevant snippet from your search.
  • You can use the Graph Snippets window to view all snippets. Right click in a empty space of the graph and select 'Open Graph Snippets Window'. It will show all the Snippets if you see duplicates it's because you can use either one of each for example SetPositionVector2 Can be used with either No Parameters, the X parameter or the X and Y.

https://github.com/user-attachments/assets/274a504f-5101-423c-af56-d23794484c3a

To create a snippet go to Create > Visual Scripting > Community > Snippets and select the type of snippet you want then set the name of the snippet in the inspector and open the graph and then connect all the units you want for the snippet.

For arguments you can create them in the inspector then in the Graph open the fuzzy finder then scroll down until you see the snippet section and click on it.

Now you can select your argument or select the empty argument to manually assign your argument using the name. You can connected it to the port where you want the argument to be used.

You should now have a read to use Graph Snippet.