5using System.Collections.Generic;
6using System.Diagnostics.CodeAnalysis;
8using Object = UnityEngine.Object;
12 public sealed partial class Asset
18 public static partial class Database
32 [ExcludeFromCodeCoverage]
35 get => AssetDatabase.DesiredWorkerCount;
38 AssetDatabase.DesiredWorkerCount = value;
39 AssetDatabase.ForceToDesiredWorkerCount();
53 [ExcludeFromCodeCoverage]
56 get => AssetDatabase.IsDirectoryMonitoringEnabled();
57 set => EditorPrefs.SetBool(
"DirectoryMonitoring", value);
68 public static Boolean
Contains(Object instance) => instance !=
null ? AssetDatabase.Contains(instance) :
false;
78 [ExcludeFromCodeCoverage]
79 public static Boolean
Contains(Int32 instanceId) => AssetDatabase.Contains(instanceId);
95 [ExcludeFromCodeCoverage]
109 [ExcludeFromCodeCoverage]
123 [ExcludeFromCodeCoverage]
142 [ExcludeFromCodeCoverage]
163 [ExcludeFromCodeCoverage]
165 ForceReserializeAssetsOptions options = ForceReserializeAssetsOptions.ReserializeAssetsAndMetadata) =>
186 [ExcludeFromCodeCoverage]
188 ForceReserializeAssetsOptions options = ForceReserializeAssetsOptions.ReserializeAssetsAndMetadata) =>
189 AssetDatabase.ForceReserializeAssets(paths, options);
206 public static void SaveAll() => AssetDatabase.SaveAssets();
260 public static void ImportAll(ImportAssetOptions options = ImportAssetOptions.Default) =>
261 AssetDatabase.Refresh(options);
static void UpgradeAssetSerializationVersion([NotNull] IEnumerable< Path > paths, ForceReserializeAssetsOptions options=ForceReserializeAssetsOptions.ReserializeAssetsAndMetadata)
Updates all native asset files to reflect any changes in serialization in the current editor version.
static void UpgradeAllAssetSerializationVersions()
Updates all native asset files to reflect any changes in serialization in the current editor version.
static Int32 DesiredWorkerCount
Gets or sets the desired worker count.
static void AllowAutoRefresh()
Will allow Unity to automatically import assets.
static Boolean DirectoryMonitoring
Returns whether directory monitoring is enabled in Preferences.
static void ImportAll(ImportAssetOptions options=ImportAssetOptions.Default)
Scans for external file system modifications and updates the Database accordingly....
static void UpgradeAssetSerializationVersion([NotNull] IEnumerable< String > paths, ForceReserializeAssetsOptions options=ForceReserializeAssetsOptions.ReserializeAssetsAndMetadata)
Updates all native asset files to reflect any changes in serialization in the current editor version.
static Boolean Contains(Object instance)
Tests if the asset is in the database.
static void DisallowAutoRefresh()
Will stop Unity from automatically importing assets.
static Boolean Contains(Int32 instanceId)
Tests if the asset is in the database.
static void SaveAll()
Saves all unsaved (dirty) assets.
static void ReleaseFileHandles()
Releases any cached file handles that Unity holds.
static String[] ToStrings([NotNull] IEnumerable< Path > paths)
Converts an IEnumerable collection of Path instances to a string array.
Represents a relative path to an asset file or folder, typically under 'Assets' or 'Packages'.