Add support for using interfaces in Visual Scripting
This commit is contained in:
@@ -76,9 +76,14 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
/// </summary>
|
||||
protected virtual void Search()
|
||||
{
|
||||
// Special case for attributes
|
||||
if (_type.Type != null && new ScriptType(typeof(Attribute)).IsAssignableFrom(_type))
|
||||
if (_type == ScriptType.Null)
|
||||
{
|
||||
// Special case for all types
|
||||
TypeUtils.GetTypes(_list, _checkFunc, _checkAssembly);
|
||||
}
|
||||
else if (_type.Type != null && new ScriptType(typeof(Attribute)).IsAssignableFrom(_type))
|
||||
{
|
||||
// Special case for attributes
|
||||
TypeUtils.GetTypesWithAttributeDefined(_type.Type, _list, _checkFunc, _checkAssembly);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
/// <summary>
|
||||
/// The all types collection from all assemblies (excluding C# system libraries). Includes only primitive and basic types from std lib.
|
||||
/// </summary>
|
||||
public readonly CachedTypesCollection All = new CachedAllTypesCollection(8096, new ScriptType(typeof(object)), type => true, HasAssemblyValidAnyTypes);
|
||||
public readonly CachedTypesCollection All = new CachedAllTypesCollection(8096, ScriptType.Null, type => true, HasAssemblyValidAnyTypes);
|
||||
|
||||
/// <summary>
|
||||
/// The all valid types collection for the Visual Script property types (includes basic types like int/float, structures, object references).
|
||||
|
||||
Reference in New Issue
Block a user