Object Field and OnDropOutside fixes

This commit is contained in:
Chromium 2025-04-28 22:34:15 +01:00
parent 68a08ee4cd
commit 512fb50c7b
2 changed files with 8 additions and 1 deletions

View File

@ -43,6 +43,8 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
window.asset.Connections.Remove(VARIABLE); window.asset.Connections.Remove(VARIABLE);
} }
if(edge.input != null)
if(edge.input.node != null)
((ImageProcessingGraphNodeVisual)edge.input.node).ToggleExposedVariable((IPTPort)edge.input, true); ((ImageProcessingGraphNodeVisual)edge.input.node).ToggleExposedVariable((IPTPort)edge.input, true);
} }

View File

@ -314,6 +314,11 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
var intField = new GreyscaleField { value = (int)greyscaleValue.value }; var intField = new GreyscaleField { value = (int)greyscaleValue.value };
return intField; return intField;
} }
else if (typeof(UnityEngine.Object).IsAssignableFrom(type))
{
var objectField = new ObjectField { value = (UnityEngine.Object)value, objectType = typeof(UnityEngine.Object) };
return objectField;
}
// Add more types as needed // Add more types as needed
return null; return null;