// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
namespace FlaxEditor.Content.Create
{
///
/// File create entry.
///
public abstract class CreateFileEntry : IFileEntryAction
{
///
public string SourceUrl { get; }
///
public string ResultUrl { get; }
///
/// Gets a value indicating whether this entry has settings to modify.
///
public virtual bool HasSettings => Settings != null;
///
/// Gets or sets the settings object to modify.
///
public virtual object Settings => null;
///
/// Initializes a new instance of the class.
///
/// The output file type.
/// The result file url.
protected CreateFileEntry(string outputType, string resultUrl)
{
SourceUrl = outputType;
ResultUrl = resultUrl;
}
///
/// Creates the result file.
///
/// True if failed, otherwise false.
public abstract bool Create();
///
public bool Execute()
{
return Create();
}
}
}