diff --git a/Source/Editor/CustomEditors/Editors/IntegerEditor.cs b/Source/Editor/CustomEditors/Editors/IntegerEditor.cs
index 651310349..3cadedc3c 100644
--- a/Source/Editor/CustomEditors/Editors/IntegerEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/IntegerEditor.cs
@@ -338,7 +338,7 @@ namespace FlaxEditor.CustomEditors.Editors
protected abstract ulong GetValue(object value);
///
- /// Gets the value from long.
+ /// Sets the value from long.
///
/// The value from editor.
/// The value to object.
diff --git a/Source/Editor/Surface/Archetypes/Constants.cs b/Source/Editor/Surface/Archetypes/Constants.cs
index 4591459f1..b94bc34cb 100644
--- a/Source/Editor/Surface/Archetypes/Constants.cs
+++ b/Source/Editor/Surface/Archetypes/Constants.cs
@@ -47,7 +47,8 @@ namespace FlaxEditor.Surface.Archetypes
base.OnShowSecondaryContextMenu(menu, location);
menu.AddSeparator();
- menu.AddButton("Convert to Parameter", OnConvertToParameter);
+ var b = menu.AddButton("Convert to Parameter", OnConvertToParameter);
+ b.Enabled = Surface.Owner is IVisjectSurfaceWindow window && Surface.Owner.SurfaceAsset && window.NewParameterTypes.Contains(_type);
}
private void OnConvertToParameter()
@@ -122,8 +123,7 @@ namespace FlaxEditor.Surface.Archetypes
private bool OnParameterRenameValidate(string value)
{
- if (Surface.Owner is not IVisjectSurfaceWindow window)
- throw new Exception("Surface owner is not a Visject Surface Window");
+ var window = (IVisjectSurfaceWindow)Surface.Owner;
return !string.IsNullOrWhiteSpace(value) && window.VisjectSurface.Parameters.All(x => x.Name != value);
}
}