Add support for using interfaces in Visual Scripting

This commit is contained in:
Wojtek Figat
2021-10-04 12:23:34 +02:00
parent ecf926a537
commit e92c22585a
8 changed files with 111 additions and 6 deletions

View File

@@ -178,7 +178,7 @@ namespace FlaxEditor.Surface
color = Colors.Enum;
else if (type.IsValueType)
color = Colors.Structures;
else if (new ScriptType(typeof(FlaxEngine.Object)).IsAssignableFrom(type))
else if (new ScriptType(typeof(FlaxEngine.Object)).IsAssignableFrom(type) || type.IsInterface)
color = Colors.Object;
else if (hint == ConnectionsHint.Vector)
color = Colors.Vector;