Optimize default C# stdlib references to prevent using jit-ed features in a game assembly
This commit is contained in:
@@ -332,7 +332,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
{
|
||||
Proxy = _proxy,
|
||||
IsAdd = true,
|
||||
Name = StringUtils.IncrementNameNumber("New parameter", x => OnParameterRenameValidate(null, x)),
|
||||
Name = Utilities.Utils.IncrementNameNumber("New parameter", x => OnParameterRenameValidate(null, x)),
|
||||
DefaultValue = TypeUtils.GetDefaultValue(new ScriptType(type)),
|
||||
};
|
||||
_proxy.Window.Undo.AddAction(action);
|
||||
|
||||
@@ -368,7 +368,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
actor.Layer = parentActor.Layer;
|
||||
|
||||
// Rename actor to identify it easily
|
||||
actor.Name = StringUtils.IncrementNameNumber(actor.GetType().Name, x => parentActor.GetChild(x) == null);
|
||||
actor.Name = Utilities.Utils.IncrementNameNumber(actor.GetType().Name, x => parentActor.GetChild(x) == null);
|
||||
}
|
||||
|
||||
// Spawn it
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
{
|
||||
var sprite = new Sprite
|
||||
{
|
||||
Name = StringUtils.IncrementNameNumber("New Sprite", name => Asset.Sprites.All(s => s.Name != name)),
|
||||
Name = Utilities.Utils.IncrementNameNumber("New Sprite", name => Asset.Sprites.All(s => s.Name != name)),
|
||||
Area = new Rectangle(Float2.Zero, Float2.One),
|
||||
};
|
||||
Asset.AddSprite(sprite);
|
||||
|
||||
@@ -529,12 +529,12 @@ namespace FlaxEditor.Windows
|
||||
string destinationName;
|
||||
if (item.IsFolder)
|
||||
{
|
||||
destinationName = StringUtils.IncrementNameNumber(item.ShortName, x => !Directory.Exists(StringUtils.CombinePaths(sourceFolder, x)));
|
||||
destinationName = Utilities.Utils.IncrementNameNumber(item.ShortName, x => !Directory.Exists(StringUtils.CombinePaths(sourceFolder, x)));
|
||||
}
|
||||
else
|
||||
{
|
||||
string extension = Path.GetExtension(sourcePath);
|
||||
destinationName = StringUtils.IncrementNameNumber(item.ShortName, x => !File.Exists(StringUtils.CombinePaths(sourceFolder, x + extension))) + extension;
|
||||
destinationName = Utilities.Utils.IncrementNameNumber(item.ShortName, x => !File.Exists(StringUtils.CombinePaths(sourceFolder, x + extension))) + extension;
|
||||
}
|
||||
|
||||
return StringUtils.CombinePaths(sourceFolder, destinationName);
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace FlaxEditor.Windows
|
||||
actor.Transform = parentActor.Transform;
|
||||
|
||||
// Rename actor to identify it easily
|
||||
actor.Name = StringUtils.IncrementNameNumber(type.Name, x => parentActor.GetChild(x) == null);
|
||||
actor.Name = Utilities.Utils.IncrementNameNumber(type.Name, x => parentActor.GetChild(x) == null);
|
||||
}
|
||||
|
||||
// Spawn it
|
||||
|
||||
Reference in New Issue
Block a user