# Editor.Asset

- Kind: class
- Namespace: `Editor`
- Assembly: `Sandbox.Tools`
- Modifiers: abstract

## Properties

- [`AbsolutePath`](/api/Editor.Asset/AbsolutePath): The absolute path as it is on disk (ie .wav not .vsnd)
- [`AssetType`](/api/Editor.Asset/AssetType): The type of this asset.
- [`CanOpenInEditor`](/api/Editor.Asset/CanOpenInEditor): Whether [Editor.Asset.OpenInEditor](/api/Editor.Asset/OpenInEditor) can do anything useful for this asset. Used to decide whether to offer an "Open" action for assets that have no file on disk (e.g. mounted resources).
- [`CanRecompile`](/api/Editor.Asset/CanRecompile): Can this asset be recompiled?
- [`HasCachedThumbnail`](/api/Editor.Asset/HasCachedThumbnail)
- [`HasCompiledFile`](/api/Editor.Asset/HasCompiledFile): True if we have a compiled file, and aren't just a source file
- [`HasSourceFile`](/api/Editor.Asset/HasSourceFile): True if we have a source file, and aren't just a _c file
- [`HasUnsavedChanges`](/api/Editor.Asset/HasUnsavedChanges): A free-use variable for the editor to use to portray that this asset somehow has changes that need to be saved to disk.
- [`IsCloud`](/api/Editor.Asset/IsCloud): This asset is from the cloud, it's in the cloud folder
- [`IsCompiled`](/api/Editor.Asset/IsCompiled): Whether the asset is compiled.
- [`IsCompiledAndUpToDate`](/api/Editor.Asset/IsCompiledAndUpToDate): Whether the asset is compiled and all dependencies are up to date. (Slower than IsCompiled)
- [`IsCompileFailed`](/api/Editor.Asset/IsCompileFailed): Whether the asset failed to compile.
- [`IsDeleted`](/api/Editor.Asset/IsDeleted): Whether the asset is deleted or not. This can happen after [Editor.Asset.Delete](/api/Editor.Asset/Delete) was called on it, or [Editor.Asset.AbsolutePath](/api/Editor.Asset/AbsolutePath) is empty.
- [`IsProcedural`](/api/Editor.Asset/IsProcedural): If true then this asset is generated at runtime somehow. Possibly from a mount system.
- [`IsTransient`](/api/Editor.Asset/IsTransient): This asset is generated in the transient folder. You don't need to see it, or keep it around. It will re-generate from something else.
- [`IsTrivialChild`](/api/Editor.Asset/IsTrivialChild): The asset was generated from another asset compile and has no source asset of its own. For example model break gibs .vmdl, .vtex files for materials, etc.
- [`LastOpened`](/api/Editor.Asset/LastOpened): When the asset was last opened through the editor.
- [`MetaData`](/api/Editor.Asset/MetaData): Asset type specific key-value based data storage.
- [`Name`](/api/Editor.Asset/Name): Name of the asset, usually the filename.
- [`Package`](/api/Editor.Asset/Package): If this asset was downloaded from sbox.game then this will be the package from which this asset was downloaded. If not then it'll be null.
- [`Path`](/api/Editor.Asset/Path): The relative path with the asset extension. ie .wav becomes .vsnd
- [`Publishing`](/api/Editor.Asset/Publishing): Access the asset publisher config.
- [`RelativePath`](/api/Editor.Asset/RelativePath): The relative path as it is on disk (ie .wav not .vsnd)
- [`Tags`](/api/Editor.Asset/Tags): Tags for this asset, for filtering purposes in the Asset Browser.

## Methods

- [`CancelThumbBuild`](/api/Editor.Asset/CancelThumbBuild)
- [`ClearInMemoryReplacement`](/api/Editor.Asset/ClearInMemoryReplacement): Reverse the changes of SetInMemoryReplacement
- [`Compile`](/api/Editor.Asset/Compile): Forcibly recompile the asset.
- [`CompileIfNeededAsync`](/api/Editor.Asset/CompileIfNeededAsync): Returns a task that will resolve when the asset is compiled. If the asset is already compiled, do nothing. Does not support maps.
- [`Delete`](/api/Editor.Asset/Delete): Delete this asset. Will send files to the recycle bin.
- [`DumpThumbnail`](/api/Editor.Asset/DumpThumbnail): Renders the thumbnail and then saves it to disk.
- [`FindStringEditInfo`](/api/Editor.Asset/FindStringEditInfo)
- [`GetAdditionalContentFiles`](/api/Editor.Asset/GetAdditionalContentFiles): Gets additional content-side related files. This includes like .rect files for materials, all .fbx and .lxo files for models, etc.
- [`GetAdditionalGameFiles`](/api/Editor.Asset/GetAdditionalGameFiles): Gets additional game-side files to be packaged (e.g. navdata). These are files that are loaded by managed code, not as native resources.
- [`GetAssetThumb`](/api/Editor.Asset/GetAssetThumb): Returns the asset preview thumbnail, with fallback to the asset type icon if there is no preview.
- [`GetCompiledFile`](/api/Editor.Asset/GetCompiledFile): Returns the compiled file path, if the asset is compiled.
- [`GetDependants`](/api/Editor.Asset/GetDependants): Returns assets that depend/use this asset.
- [`GetInputDependencies`](/api/Editor.Asset/GetInputDependencies): Gets input dependencies for an asset. This'll be tga's for a texture and stuff like that.
- [`GetParents`](/api/Editor.Asset/GetParents): Returns assets that are parents of this asset (i.e. this asset is a compiled child resource of the returned assets).
- [`GetPreviewModel`](/api/Editor.Asset/GetPreviewModel): Try to create a preview model if we're fbx, obj, etc
- [`GetReferences`](/api/Editor.Asset/GetReferences): Returns assets that this asset references/uses.
- [`GetSourceFile`](/api/Editor.Asset/GetSourceFile): Returns the source file path, if the sources are present.
- [`GetUnrecognizedReferencePaths`](/api/Editor.Asset/GetUnrecognizedReferencePaths): Unrecognized reference paths listed by the data that could not be resolved into Asset*s
- [`LoadResource`](/api/Editor.Asset/LoadResource): Try to load this asset as an automatically determined resource type. If this isn't a resource type (like an Image) then it will return null.
- [`OpenInEditor`](/api/Editor.Asset/OpenInEditor): Try to open this asset in a supported editor. You can specify nativeEditor to open in a specific editor.
- [`OverrideThumbnail`](/api/Editor.Asset/OverrideThumbnail): Override the Assets thumbnail with given one.
- [`ReadJson`](/api/Editor.Asset/ReadJson): Try to get the raw Json string, for a managed asset type (a GameResource)
- [`RebuildThumbnail`](/api/Editor.Asset/RebuildThumbnail): Delete existing cached thumbnail, optionally queuing for building a new one ASAP.
- [`RecordOpened`](/api/Editor.Asset/RecordOpened): Tell asset system that this asset was opened. Sticks it on the recent opened list.
- [`RenderThumb`](/api/Editor.Asset/RenderThumb): Immediately render a preview thumbnail for this asset, and return it.
- [`SaveToDisk`](/api/Editor.Asset/SaveToDisk): Save a game resource instance to disk. This is used internally by asset inspector and for asset creation.
- [`SetInMemoryReplacement`](/api/Editor.Asset/SetInMemoryReplacement): Set data for this asset which will be compiled in memory. This is used to preview asset changes (like materials) before committing to disk.
- [`TryLoadResource`](/api/Editor.Asset/TryLoadResource): Try to load this asset as a [Sandbox.Resource](/api/Sandbox.Resource) of given type.
- [`UploadVideo`](/api/Editor.Asset/UploadVideo): Upload a video for this package
