Fixes and improvements

This commit is contained in:
Wojciech Figat
2021-11-18 11:21:30 +01:00
parent 2a2b70f83f
commit cdcb2f8f7a
15 changed files with 46 additions and 48 deletions

View File

@@ -698,6 +698,11 @@ namespace FlaxEditor.Scripting
/// </summary>
public static readonly ScriptType Void = new ScriptType(typeof(void));
/// <summary>
/// A <see cref="ScriptType" /> that is System.Object.
/// </summary>
public static readonly ScriptType Object = new ScriptType(typeof(object));
/// <summary>
/// Gets the type of the script as <see cref="System.Type"/>.
/// </summary>

View File

@@ -64,7 +64,7 @@ namespace FlaxEditor.Scripting
Utilities.Utils.InitDefaultValues(value);
return value;
}
if (new ScriptType(typeof(object)).IsAssignableFrom(type))
if (ScriptType.Object.IsAssignableFrom(type))
return null;
if (type.CanCreateInstance)
{