A small editor-side data struct describing a post-processing UI component. It stores title, category, icon and ordering, implements IValid via an IsValid property that checks title is nonempty, and has a constructor that sets defaults and order.
namespace ShaderGraphPlus;
public struct PostProcessingComponentInfo : IValid
{
public string ComponentTitle { get; set; }
public string ComponentCategory { get; set; }
public string Icon { get; set; }
public int Order { get; set; }
public bool IsValid => !string.IsNullOrWhiteSpace( ComponentTitle );
public PostProcessingComponentInfo( int order )
{
ComponentTitle = "";
ComponentCategory = "";
Icon = "";
Order = order;
}
}