Fixes for Visual Scripting in Editor

This commit is contained in:
Wojtek Figat
2022-05-01 21:11:15 +02:00
parent 3546793e12
commit 26d4ebd3d5
5 changed files with 18 additions and 13 deletions

View File

@@ -57,8 +57,9 @@ void OnBinaryModuleLoaded(BinaryModule* module);
MonoReflectionType* CustomEditorsUtil::GetCustomEditor(MonoReflectionType* refType)
{
if (!refType)
return nullptr;
MonoType* type = mono_reflection_type_get_type(refType);
Entry result;
if (Cache.TryGet(type, result))
{
@@ -68,7 +69,6 @@ MonoReflectionType* CustomEditorsUtil::GetCustomEditor(MonoReflectionType* refTy
return MUtils::GetType(editor->GetNative());
}
}
return nullptr;
}

View File

@@ -107,6 +107,8 @@ namespace FlaxEditor.CustomEditors
internal static CustomEditor CreateEditor(ScriptType targetType, bool canUseRefPicker = true)
{
if (targetType == ScriptType.Null)
return new GenericEditor();
if (targetType.IsArray)
{
return new ArrayEditor();