From 3331753bcd0fe737db97ab0d71a1c4f4000a3947 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 29 Jul 2021 10:05:20 +0200 Subject: [PATCH] Expose `TypeUtils.GetType` to public --- Source/Editor/Scripting/TypeUtils.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Scripting/TypeUtils.cs b/Source/Editor/Scripting/TypeUtils.cs index 60f64ab8e..5a49814dd 100644 --- a/Source/Editor/Scripting/TypeUtils.cs +++ b/Source/Editor/Scripting/TypeUtils.cs @@ -288,7 +288,12 @@ namespace FlaxEditor.Scripting return typeof(MulticastDelegate).IsAssignableFrom(type.BaseType); } - internal static Type GetType(ScriptType type) + /// + /// Gets the managed type fo the script type (the first found from this or base types). + /// + /// The input type of the object to check. + /// The managed type. + public static Type GetType(ScriptType type) { while (type.Type == null) type = type.BaseType;