Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Asset

This class containes information about the version control state of an asset.
Read time 1 minuteLast updated 5 days ago

Definition

public class Asset

Properties

Property

Description

assetPathGets the path of the Asset relative to the project root. If the Asset is a meta file, the path to the meta file is returned.
fullNameGets the full name of the asset including extension.
isFolderReturns true if the asset is a folder.
isInCurrentProjectReturns true if the asset file exists and is in the current project.
isMetaReturns true if the instance of the Asset class actually refers to a .meta file.
lockedReturns true if the asset is locked by the version control system.
metaPathGets the path of the meta file for this Asset relative to the project root. If the Asset is a meta file, the path to the meta file is returned.
nameGet the name of the asset.
pathGets the path of the asset.
readOnlyReturns true is the asset is read only.
stateGets the version control state of the asset.

Methods

Method

Description

EditOpens the assets in an associated editor.
IsOneOfStatesReturns true if the version control state of the assets is one of the input states.
IsStateReturns true if the version control state of the asset exactly matches the input state.
LoadLoads the asset to memory.

Enums

Enum

Description

Asset.StatesDescribes the various version control states an asset can have.