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

@@ -855,7 +855,7 @@ namespace FlaxEditor.Surface.Archetypes
{
_picker = new TypePickerControl
{
Type = new ScriptType(typeof(object)),
Type = ScriptType.Object,
Bounds = new Rectangle(FlaxEditor.Surface.Constants.NodeMarginX, FlaxEditor.Surface.Constants.NodeMarginY + FlaxEditor.Surface.Constants.NodeHeaderSize, 140, 16),
Parent = this,
};
@@ -1515,7 +1515,7 @@ namespace FlaxEditor.Surface.Archetypes
{
TypeID = 26,
Title = "Cast Value",
Create = (id, context, arch, groupArch) => new CastNode(id, context, arch, groupArch, new ScriptType(typeof(object))),
Create = (id, context, arch, groupArch) => new CastNode(id, context, arch, groupArch, ScriptType.Object),
Description = "Tries to cast the object to a given type. Returns null if fails.",
Flags = NodeFlags.VisualScriptGraph,
Size = new Vector2(200, 60),

View File

@@ -317,7 +317,7 @@ namespace FlaxEditor.Surface
public Box AddBox(bool isOut, int id, int yLevel, string text, ScriptType type, bool single, int valueIndex = -1)
{
if (type == ScriptType.Null)
type = new ScriptType(typeof(object));
type = ScriptType.Object;
// Try to reuse box
var box = GetBox(id);