Properties

AbsolutePath The absolute path as it is on disk (ie .wav not .vsnd)
AssetType The type of this asset.
CanRecompile Can this asset be recompiled?
HasCachedThumbnail
HasCompiledFile True if we have a compiled file, and aren't just a source file
HasSourceFile True if we have a source file, and aren't just a _c file
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 This asset is from the cloud, it's in the cloud folder
IsCompiled Whether the asset is compiled.
IsCompiledAndUpToDate Whether the asset is compiled and all dependencies are up to date. (Slower than IsCompiled)
IsCompileFailed Whether the asset failed to compile.
IsDeleted Whether the asset is deleted or not. This can happen after Editor.Asset.Delete was called on it, or Editor.Asset.AbsolutePath is empty.
IsProcedural If true then this asset is generated at runtime somehow. Possibly from a mount system.
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 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 When the asset was last opened through the editor.
MetaData Asset type specific key-value based data storage.
Name Name of the asset, usually the filename.
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 The relative path with the asset extension. ie .wav becomes .vsnd
Publishing Access the asset publisher config.
RelativePath The relative path as it is on disk (ie .wav not .vsnd)
Tags Tags for this asset, for filtering purposes in the Asset Browser.

Methods

CancelThumbBuild
ClearInMemoryReplacement Reverse the changes of SetInMemoryReplacement
Compile Forcibly recompile the 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 Delete this asset. Will send the source and compiled files to the recycle bin.
DumpThumbnail Renders the thumbnail and then saves it to disk.
FindStringEditInfo
GetAdditionalRelatedFiles Gets additional related files. This includes like .rect files for materials, all .fbx and .lxo files for models, etc.
GetAssetThumb Returns the asset preview thumbnail, with fallback to the asset type icon if there is no preview.
GetCompiledFile Returns the compiled file path, if the asset is compiled.
GetDependants Returns assets that depend/use this asset.
GetInputDependencies Gets input dependencies for an asset. This'll be tga's for a texture and stuff like that.
GetPreviewModel Try to create a preview model if we're fbx, obj, etc
GetReferences Returns assets that this asset references/uses.
GetSourceFile Returns the source file path, if the sources are present.
GetUnrecognizedReferencePaths Unrecognized reference paths listed by the data that could not be resolved into Asset*s
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.
LoadUserTags
OpenInEditor Try to open this asset in a supported editor. You can specify nativeEditor to open in a specific editor.
OverrideThumbnail Override the Assets thumbnail with given one.
ReadJson Try to get the raw Json string, for a managed asset type (a GameResource)
RebuildThumbnail Delete existing cached thumbnail, optionally queuing for building a new one ASAP.
RecordOpened Tell asset system that this asset was opened. Sticks it on the recent opened list.
RenderThumb Immediately render a preview thumbnail for this asset, and return it.
SaveToDisk Save a game resource instance to disk. This is used internally by asset inspector and for asset creation.
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 Try to load this asset as a Sandbox.Resource of given type.

Static Methods

UploadVideo Upload a video for this package
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.