fixed spooky warning
This commit is contained in:
parent
9e512b8e8e
commit
e3e851e9db
@ -31,7 +31,13 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
||||
window.ChangeCoordinatesTo(window, window.cachedMousePos - window.Window.position.position);
|
||||
var graphMousePosition = window.contentViewContainer.WorldToLocal(mousePos);
|
||||
|
||||
SearchWindow.Open(new SearchWindowContext(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)), new ImageProcessingGraphSearchProvider.CustomSearchProviderForEdge(window.searchProvider, edge, (IPTPort)edge.input, (IPTPort)edge.output));
|
||||
var searchProviderInstance = ScriptableObject.CreateInstance<ImageProcessingGraphSearchProvider.CustomSearchProviderForEdge>();
|
||||
searchProviderInstance.Init(window.searchProvider, edge, (IPTPort)edge.input, (IPTPort)edge.output);
|
||||
|
||||
SearchWindow.Open(
|
||||
new SearchWindowContext(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)),
|
||||
searchProviderInstance
|
||||
);
|
||||
|
||||
// Remove connections as you did
|
||||
List<GraphConnection> connections = new List<GraphConnection>();
|
||||
|
@ -227,10 +227,10 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
||||
|
||||
public class CustomSearchProviderForEdge : ScriptableObject, ISearchWindowProvider
|
||||
{
|
||||
private readonly ImageProcessingGraphSearchProvider original;
|
||||
private readonly Edge edge;
|
||||
private readonly IPTPort inputPort;
|
||||
private readonly IPTPort outputPort;
|
||||
private ImageProcessingGraphSearchProvider original;
|
||||
private Edge edge;
|
||||
private IPTPort inputPort;
|
||||
private IPTPort outputPort;
|
||||
|
||||
public CustomSearchProviderForEdge(ImageProcessingGraphSearchProvider original, Edge edge, IPTPort inputPort, IPTPort outputPort)
|
||||
{
|
||||
@ -240,6 +240,15 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
||||
this.outputPort = outputPort;
|
||||
}
|
||||
|
||||
public void Init(ImageProcessingGraphSearchProvider original, Edge edge, IPTPort inputPort,
|
||||
IPTPort outputPort)
|
||||
{
|
||||
this.original = original;
|
||||
this.edge = edge;
|
||||
this.inputPort = inputPort;
|
||||
this.outputPort = outputPort;
|
||||
}
|
||||
|
||||
public List<SearchTreeEntry> CreateSearchTree(SearchWindowContext context)
|
||||
{
|
||||
return original.CreateSearchTreeForEdge(context, edge);
|
||||
|
Loading…
x
Reference in New Issue
Block a user