using System;
using System.Collections.Generic;
using UnityEngine;
namespace AutoGroupGenerator
{
///
/// Identifies the last processing step to execute.
///
public enum LastProcessingStep
{
///
/// No processing steps are executed.
///
None = 0,
///
/// Stops after collecting input assets.
///
InputAssets = 10,
///
/// Stops after generating the dependency graph.
///
GenerateDependencyGraph = 11,
///
/// Stops after identifying subgraphs and their source relationships.
///
GenerateSubGraphs = 12,
///
/// Stops after generating group layouts.
///
GenerateGroupLayout = 13,
///
/// Stops after creating addressable groups.
///
GenerateAddressableGroups = 14,
///
/// Stops after cleanup operations that refine addressable output.
///
Cleanup = 15,
///
/// Executes all steps in the pipeline.
///
All = 100
}
///
/// Flags controlling which processing steps emit reports.
///
[Flags]
public enum ProcessStepReport
{
///
/// Write a report for the input assets step.
///
InputAssets = 1 << 0,
///
/// Write a report for the dependency graph step.
///
DependencyGraph = 1 << 1,
///
/// Write a report for the subgraph step.
///
SubGraphs = 1 << 2,
///
/// Write a report for the group layout step.
///
GroupLayout = 1 << 3,
///
/// Write a report for the addressable groups step.
///
AddressableGroups = 1 << 4,
///
/// Write a report for cleanup operations.
///
Cleanup = 1 << 5
}
///
/// Defines verbosity levels for logging output.
///
public enum LogLevelID
{
///
/// Log only errors to reduce output during batch runs.
///
OnlyErrors = 0,
///
/// Log informational messages for normal pipeline monitoring.
///
Info = 1,
///
/// Log developer-focused diagnostics.
///
Developer = 2
}
///
/// ScriptableObject containing configuration for the AutoGroupGenerator workflows.
///
///
///
///
[CreateAssetMenu(menuName = Constants.ContextMenus.Root + "Settings")]
public class AutoGroupGeneratorSettings : ScriptableObject
{
#region Fields
///
/// Input rules used to select assets to process.
///
[Header("Rules")]
public List InputRules = new List();
///
/// Output rules used to post-process generated layouts.
///
public List OutputRules = new List();
[Header("Cleanup")]
[SerializeField]
[Tooltip("Remove any unused addressable asset entries")]
private bool m_RemoveUnnecessaryEntries = false;
[SerializeField]
private bool m_RemoveEmptyGroups = true;
[SerializeField]
private bool m_RemoveAddressableScenesFromBuildProfile = true;
[SerializeField]
private bool m_SortAddressableGroups = true;
[Header("Process")]
[SerializeField]
private bool m_ScanForUnsupportedFiles = false;
[SerializeField]
private LastProcessingStep m_LastProcessingStep = LastProcessingStep.All;
private bool m_SaveGraphOnDisk = false;
[Header("Reports")]
[SerializeField]
ProcessStepReport m_ProcessReport = 0;
[SerializeField]
private LogLevelID m_LogLevel = LogLevelID.OnlyErrors;
#endregion
#region Properties
///
/// Gets the last processing step to execute.
///
public LastProcessingStep LastProcessingStep => m_LastProcessingStep;
///
/// Gets the configured logging verbosity.
///
public LogLevelID LogLevel => m_LogLevel;
///
/// Gets a value indicating whether to persist the dependency graph to disk.
///
public bool SaveGraphOnDisk => m_SaveGraphOnDisk;
///
/// Gets a value indicating whether to remove empty addressable groups.
///
public bool RemoveEmptyGroups => m_RemoveEmptyGroups;
///
/// Gets a value indicating whether to remove Addressable entries that are no longer needed.
///
public bool RemoveUnnecessaryEntries => m_RemoveUnnecessaryEntries;
///
/// Gets a value indicating whether to remove Addressable scenes from the build profile.
///
public bool RemoveAddressableScenesFromBuildProfile => m_RemoveAddressableScenesFromBuildProfile;
///
/// Gets a value indicating whether addressable groups should be sorted.
///
public bool SortAddressableGroups => m_SortAddressableGroups;
///
/// Gets a value indicating whether to scan assets for unsupported file types.
///
public bool ScanForUnsupportedFiles => m_ScanForUnsupportedFiles;
///
/// Gets the report flags for processing steps.
///
public ProcessStepReport ProcessReport => m_ProcessReport;
#endregion
#region Methods
///
/// Validates the current settings configuration.
///
public void Validate()
{
}
#endregion
}
}