#nullable enable
using System;
using System.Collections.Generic;
namespace Needle.Engine
{
[Serializable]
public struct DependencyInfo
{
public string uri;
public long fileSize;
///
/// other external/nested gltfs that reference this uri
///
public List? referencedBy;
public DependencyInfo(DependencyInfo other)
{
this.uri = other.uri;
this.fileSize = other.fileSize;
if (other.referencedBy != null)
this.referencedBy = new List(other.referencedBy);
else this.referencedBy = null;
}
}
///
/// Used to track dependencies to external assets of gltf files
///
public interface IDependencyRegistry
{
int Count { get; }
IReadOnlyCollection Dependencies { get; }
IReadOnlyList Contexts { get; }
void RegisterDependency(string uri, string source, IExportContext context);
IEnumerable GetRelativeTo(string basePath);
}
}