6using System.Diagnostics.CodeAnalysis;
8using Object = UnityEngine.Object;
12 public sealed partial class Asset
52 public static Boolean
IsImported([NotNull]
Path path) => path !=
null && path.Exists;
64 [ExcludeFromCodeCoverage]
65 public static Boolean
IsLoaded([NotNull]
Path path) => AssetDatabase.IsMainAssetAtPathLoaded(path);
76 [ExcludeFromCodeCoverage]
77 public static Boolean
IsMain([NotNull] Object asset) => AssetDatabase.IsMainAsset(asset);
88 [ExcludeFromCodeCoverage]
89 public static Boolean
IsSub([NotNull] Object asset) => AssetDatabase.IsSubAsset(asset);
105 [ExcludeFromCodeCoverage]
106 public static Boolean
IsForeign([NotNull] Object asset) => AssetDatabase.IsForeignAsset(asset);
122 [ExcludeFromCodeCoverage]
123 public static Boolean
IsNative([NotNull] Object asset) => AssetDatabase.IsNativeAsset(asset);
130 public static Boolean
IsScene([NotNull] Object asset) => asset is SceneAsset;
static Boolean Contains(Object instance)
Tests if the asset is in the database.
Groups all asset database functionality.
Represents a relative path to an asset file or folder, typically under 'Assets' or 'Packages'.
static Boolean IsMain([NotNull] Object asset)
Returns whether this object is the asset's 'main' object.
static Boolean IsImported([NotNull] Path path)
Checks if the path is in the AssetDatabase.
static Boolean IsScene([NotNull] Object asset)
Returns true if the given object is of type SceneAsset.
static Boolean IsForeign([NotNull] Object asset)
Returns whether this is a foreign asset.
static Boolean IsLoaded([NotNull] Path path)
Returns whether the (main) asset at the path is loaded.
static Boolean IsSub([NotNull] Object asset)
Returns whether this object is a sub-asset of a composite asset.
static Boolean IsNative([NotNull] Object asset)
Returns whether this is a native asset.
static Boolean IsImported([NotNull] Object instance)
Checks if the object is an asset in the AssetDatabase.
Groups asset status related functions.