playtest-unity/playtest/Library/PackageCache/com.unity.visualscripting@1.../Editor/VisualScripting.Flow/FlowEditorBindings.cs

27 lines
638 B
C#
Raw Normal View History

2023-06-19 23:21:21 -04:00
namespace Unity.VisualScripting
{
[InitializeAfterPlugins]
public static class FlowEditorBindings
{
static FlowEditorBindings()
{
Flow.isInspectedBinding = IsInspected;
}
private static bool IsInspected(GraphPointer pointer)
{
Ensure.That(nameof(pointer)).IsNotNull(pointer);
foreach (var graphWindow in GraphWindow.tabsNoAlloc)
{
if (graphWindow.reference?.InstanceEquals(pointer) ?? false)
{
return true;
}
}
return false;
}
}
}