Multiple Window (Script Graph in BOLT)

I would like to know if I can or will be able to open multiple graphical editor windows and see various streams, just as I can with C #. It is somewhat tedious to click to see a different stream without being able to see 2 or compare.

Old Post: https://support.ludiq.io/en/communities/5/topics/287-multiple-graph-window-tabs

I believe UnityVS is sticking to one window workflow, same as other Unity tools such as Shader Graph.

Yes, but you cannot open 2 graphical windows, it sticks, which means that if you click on an object the graph does not change, but you cannot see 2 graphs at the same time.

I could do that with Bolt and now it’s not possible?! :frowning:

Confirmed. All the “glue” is there but Unity VS uses just one window:

  1. Open a project with two graphs attached to two Game Objects, A and B. Unity 2022.1.12f1 VS 1.7.8
  2. Select “A” and see the Inspector. “Edit Graph”. See the graph for “A”.
  3. Use the Menu “Window > Visual Scripting > Visual Scripting Graph”. See a new window (excitement!). Choose “Browse to open a graph”. Pick “B”. The window closes (disappointment!).
  4. See the graph for “B” replaces the graph for “A”. Only one script is visible at a time.

Ideally, whatever the Unity team that wrote the window for e.g “Animation” did, which allows multiple simultaneous tabs, is what the VS team could explore doing.

1 Like

LOL'ing here .. I hacked the package locally and got it to open, only in a limited UI navigation way, to show multiple Script Graph windows with different scripts.

Usage:
8342385--1097259--upload_2022-8-6_11-20-12.jpg
and
8342385--1097253--upload_2022-8-6_11-18-10.jpg
and
8342385--1097256--upload_2022-8-6_11-18-22.png

Thank you Joachim for mandating that packages be full-source whenever possible.

  1. Copy / paste the "/PackageCache/ .. visualscripting@some.number.here" folder to the "/Packages" folder.
  2. Optionally, notice Unity recompiles, and shows in the Package Manager window that VS is now a "custom" package. SO when you're sick of this hack, delete the pasted folder and maybe re-install VS from the Unity repository
  3. Change a line of code, starting where I put the Debug.Log part, at /Packages/recently-pasted-vs-package@some.number/Editor/VisualScripting.Shared/EmptyGraphWindow.cs:
private void OpenGraphAsset(UnityObject unityObject, bool shouldSetSceneAsDirty)
{
    shouldCloseWindow = true;
    ScriptGraphAsset scriptGraphAsset = unityObject as ScriptGraphAsset;
    ...
    if (shouldSetSceneAsDirty)
    {
        EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
    }
    Debug.Log("NICK: opening tab instead of active");
    // GraphWindow.OpenActive(graphReference);
    GraphWindow.OpenTab(graphReference);
}
  1. Then use Window > Visual Scripting > Visual Scripting Graph and do the "Browse" button on a different script. Boom.

WARNING this might corrupt your scripts. I have not tested this at all. The VS codebase might assume something with static variables, etc.

Edit: in my limited testing, it works fine for me. No guarantees that it won't melt your laptop however. :P

1 Like

I made an addon tool to improve some things. Not sure how it is with the latest UVS 1.7.8 but check it out.

Some updated tools for use with VS - Null Texture fix | Multi-Window | Game View max FPS - Unity Forum

1 Like

I managed to open a second window by clicking on a Subgraph node inside a graph and then clicking "Open in new window" in the Context Menu that pops up after right-clicking. Works flawlessly and you can keep it forever and open whatever you want. Just like with Bolt. No add-ons required.

The only feature request we now need is to make this feature easier to find.

3 Likes