diff --git a/Source/Editor/Content/Create/VisualScriptCreateEntry.cs b/Source/Editor/Content/Create/VisualScriptCreateEntry.cs index 5fbc3bd3b..07a08b488 100644 --- a/Source/Editor/Content/Create/VisualScriptCreateEntry.cs +++ b/Source/Editor/Content/Create/VisualScriptCreateEntry.cs @@ -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; } } diff --git a/Source/Editor/Scripting/ScriptType.cs b/Source/Editor/Scripting/ScriptType.cs index d5a064546..bfe3ca250 100644 --- a/Source/Editor/Scripting/ScriptType.cs +++ b/Source/Editor/Scripting/ScriptType.cs @@ -748,7 +748,7 @@ namespace FlaxEditor.Scripting /// /// Gets a value indicating whether the type is declared public. /// - public bool IsPublic => _managed != null ? _managed.IsPublic : _custom != null && _custom.IsPublic; + public bool IsPublic => _managed != null ? _managed.IsPublic || _managed.IsNestedPublic : _custom != null && _custom.IsPublic; /// /// Gets a value indicating whether the type is abstract and must be overridden. diff --git a/Source/Editor/Windows/Assets/VisualScriptWindow.cs b/Source/Editor/Windows/Assets/VisualScriptWindow.cs index e19fe54ca..f9b6f01ad 100644 --- a/Source/Editor/Windows/Assets/VisualScriptWindow.cs +++ b/Source/Editor/Windows/Assets/VisualScriptWindow.cs @@ -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)