Fix using nested types in Visual Script
This commit is contained in:
@@ -25,7 +25,7 @@ namespace FlaxEditor.Content.Create
|
||||
|
||||
private static bool IsValid(Type type)
|
||||
{
|
||||
return type.IsPublic && !type.IsSealed && !type.IsGenericType;
|
||||
return (type.IsPublic || type.IsNestedPublic) && !type.IsSealed && !type.IsGenericType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -748,7 +748,7 @@ namespace FlaxEditor.Scripting
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the type is declared public.
|
||||
/// </summary>
|
||||
public bool IsPublic => _managed != null ? _managed.IsPublic : _custom != null && _custom.IsPublic;
|
||||
public bool IsPublic => _managed != null ? _managed.IsPublic || _managed.IsNestedPublic : _custom != null && _custom.IsPublic;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the type is abstract and must be overridden.
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
|
||||
private static bool IsValid(Type type)
|
||||
{
|
||||
return type.IsPublic && !type.IsSealed && !type.IsGenericType;
|
||||
return (type.IsPublic || type.IsNestedPublic) && !type.IsSealed && !type.IsGenericType;
|
||||
}
|
||||
|
||||
public void OnLoad(VisualScriptWindow window)
|
||||
|
||||
Reference in New Issue
Block a user