@@ -155,6 +155,11 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly CachedTypesCollection All = new CachedAllTypesCollection(8096, ScriptType.Null, type => true, HasAssemblyValidAnyTypes);
|
public readonly CachedTypesCollection All = new CachedAllTypesCollection(8096, ScriptType.Null, type => true, HasAssemblyValidAnyTypes);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The all types collection from all assemblies (including C# system libraries).
|
||||||
|
/// </summary>
|
||||||
|
public readonly CachedTypesCollection AllWithStd = new CachedTypesCollection(8096, ScriptType.Null, type => true, assembly => true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The all valid types collection for the Visual Script property types (includes basic types like int/float, structures, object references).
|
/// The all valid types collection for the Visual Script property types (includes basic types like int/float, structures, object references).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -574,21 +579,17 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
|||||||
private static bool HasAssemblyValidAnyTypes(Assembly assembly)
|
private static bool HasAssemblyValidAnyTypes(Assembly assembly)
|
||||||
{
|
{
|
||||||
var codeBase = Utils.GetAssemblyLocation(assembly);
|
var codeBase = Utils.GetAssemblyLocation(assembly);
|
||||||
|
if (string.IsNullOrEmpty(codeBase))
|
||||||
|
return true;
|
||||||
#if USE_NETCORE
|
#if USE_NETCORE
|
||||||
if (assembly.ManifestModule.FullyQualifiedName == "<In Memory Module>")
|
if (assembly.ManifestModule.FullyQualifiedName == "<In Memory Module>")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(codeBase))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// Skip runtime related assemblies
|
// Skip runtime related assemblies
|
||||||
string repositoryUrl = assembly.GetCustomAttributes<AssemblyMetadataAttribute>().FirstOrDefault(x => x.Key == "RepositoryUrl")?.Value ?? "";
|
string repositoryUrl = assembly.GetCustomAttributes<AssemblyMetadataAttribute>().FirstOrDefault(x => x.Key == "RepositoryUrl")?.Value ?? "";
|
||||||
if (repositoryUrl != "https://github.com/dotnet/runtime")
|
if (repositoryUrl != "https://github.com/dotnet/runtime")
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
if (string.IsNullOrEmpty(codeBase))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// Skip assemblies from in-build Mono directory
|
// Skip assemblies from in-build Mono directory
|
||||||
if (!codeBase.Contains("/Mono/lib/mono/"))
|
if (!codeBase.Contains("/Mono/lib/mono/"))
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -140,12 +140,12 @@ namespace FlaxEditor.Surface
|
|||||||
var searchStartTime = DateTime.Now;
|
var searchStartTime = DateTime.Now;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
foreach (var scriptType in Editor.Instance.CodeEditing.All.Get())
|
foreach (var scriptType in Editor.Instance.CodeEditing.AllWithStd.Get())
|
||||||
{
|
{
|
||||||
if (!SurfaceUtils.IsValidVisualScriptType(scriptType))
|
if (SurfaceUtils.IsValidVisualScriptType(scriptType))
|
||||||
continue;
|
{
|
||||||
|
_iterator(scriptType, _cache, _version);
|
||||||
_iterator(scriptType, _cache, _version);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add group to context menu (on a main thread)
|
// Add group to context menu (on a main thread)
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ using FlaxEditor.Surface.Elements;
|
|||||||
using FlaxEngine;
|
using FlaxEngine;
|
||||||
using FlaxEngine.GUI;
|
using FlaxEngine.GUI;
|
||||||
using FlaxEngine.Utilities;
|
using FlaxEngine.Utilities;
|
||||||
using Object = FlaxEngine.Object;
|
|
||||||
|
|
||||||
namespace FlaxEditor.Surface
|
namespace FlaxEditor.Surface
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user