using System;
using UnityEngine;
namespace UnityEditor.AddressableAssets.Build
{
///
/// The result of IDataBuilder.Build.
///
public interface IDataBuilderResult
{
///
/// Duration of the build in seconds.
///
double Duration { get; set; }
///
/// The number of addressable assets contained in the build.
///
int LocationCount { get; set; }
///
/// Error string, if any. If Succeeded is true, this may be null.
///
string Error { get; set; }
///
/// Path of runtime settings file
///
string OutputPath { get; set; }
///
/// Registry of files created during the build
///
FileRegistry FileRegistry { get; set; }
}
///
/// Builds objects of type IDataBuilderResult.
///
public interface IDataBuilder
{
///
/// The name of the builder, used for GUI.
///
string Name { get; }
///
/// Can this builder build the type of data requested.
///
/// The data type.
/// True if the build can build it.
bool CanBuildData() where T : IDataBuilderResult;
///
/// Build the data of a specific type.
///
/// The data type.
/// The builderInput used to build the data.
/// The built data.
TResult BuildData(AddressablesDataBuilderInput builderInput) where TResult : IDataBuilderResult;
///
/// Clears all cached data.
///
void ClearCachedData();
}
}