using System; using System.Collections.Generic; using UnityEditor.Build.Content; using UnityEditor.Build.Pipeline.Interfaces; using UnityEditor.Build.Pipeline.Utilities; using UnityEngine; namespace UnityEditor.Build.Pipeline { /// /// Basic implementation of IDependencyData. Stores the dependency and usage data calculated during a build. /// /// [Serializable] public class BuildDependencyData : IDependencyData { /// public Dictionary AssetInfo { get; private set; } /// public Dictionary AssetUsage { get; private set; } /// public Dictionary SceneInfo { get; private set; } /// public Dictionary SceneUsage { get; private set; } /// public Dictionary DependencyHash { get; private set; } /// /// Stores how lighting information is being used during a build. /// public BuildUsageTagGlobal GlobalUsage { get; set; } [NonSerialized] BuildUsageCache m_BuildUsageCache; /// /// Stores the dependency caching object. /// public BuildUsageCache DependencyUsageCache { get { if (m_BuildUsageCache == null) m_BuildUsageCache = new BuildUsageCache(); return m_BuildUsageCache; } } /// /// Default constructor, initializes properties to defaults /// public BuildDependencyData() { AssetInfo = new Dictionary(); AssetUsage = new Dictionary(); SceneInfo = new Dictionary(); SceneUsage = new Dictionary(); DependencyHash = new Dictionary(); m_BuildUsageCache = new BuildUsageCache(); GlobalUsage = GraphicsSettingsApi.GetGlobalUsage(); } } /// /// Basic implementation of IObjectDependencyData. Stores the dependencies between objects calculated during a build. /// /// [Serializable] internal class ObjectDependencyData : IObjectDependencyData { /// public Dictionary> ObjectDependencyMap { get; } /// /// Default constructor, initializes properties to defaults /// public ObjectDependencyData() { ObjectDependencyMap = new Dictionary>(); } } }