Version: 2022.3
LanguageEnglish
  • C#

Asset

class in UnityEditor.VersionControl

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

This class containes information about the version control state of an asset.

Properties

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.

Public Methods

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.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961