using System;
using System.Collections.Generic;
using UnityEditor.Build.Content;
using UnityEditor.Build.Pipeline.Tasks;
namespace UnityEditor.Build.Pipeline.Interfaces
{
#if UNITY_2019_3_OR_NEWER
///
/// Custom Content struct mapping a source asset to a processor to generate custom data for that asset.
///
[Serializable]
public struct CustomContent : IEquatable
{
///
/// Input Asset for custom content
///
public GUID Asset { get; set; }
///
/// Processor function to run to convert the input asset to the custom content
///
public Action Processor;
///
/// IEquatable Equals operator to handle generic collections
///
/// Other CustomContent object to compare against.
///
public bool Equals(CustomContent other)
{
return Asset == other.Asset && Processor == other.Processor;
}
}
///
/// Base interface for storing the list of Custom Assets generated during the Scriptable Build Pipeline.
///
public interface ICustomAssets : IContextObject
{
///
/// List of Custom Assets to include.
///
List Assets { get; }
}
#endif
///
/// Base interface for feeding Assets to the Scriptable Build Pipeline.
///
public interface IBuildContent : IContextObject
{
///
/// List of Assets to include.
///
List Assets { get; }
///
/// List of Scenes to include.
///
List Scenes { get; }
#if UNITY_2019_3_OR_NEWER
///
/// List of custom content to be included in asset bundles.
///
List CustomAssets { get; }
#endif
}
///
/// Base interface for feeding Assets with explicit Asset Bundle layout to the Scriptable Build Pipeline.
///
public interface IBundleBuildContent : IBuildContent
{
///
/// Specific layout of asset bundles to assets or scenes.
///
Dictionary> BundleLayout { get; }
#if UNITY_2019_3_OR_NEWER
///
/// Additional list of raw files to add to an asset bundle
///
Dictionary> AdditionalFiles { get; }
#endif
///
/// Custom loading identifiers to use for Assets or Scenes.
///
Dictionary Addresses { get; }
}
}