找回密碼
 注冊帳號

掃一掃,訪問微社區

assetimporter 資源導入器

2015-1-1 04:11| 發布者: 楊炎| 查看: 1728| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: assetimporter 資源導入器inherits fromobjectbase class from which asset importers for specific asset types derive.作為特殊資源類型派生的資源導入器的基類。note: this is an editor class. to use it you ha ...

assetimporter 資源導入

inherits fromobject

base class from which asset importers for specific asset types derive.

作為特殊資源類型派生的資源導入器的基類。

note: this is an editor class. to use it you have to place your script in assets/editor inside your project folder. editor classes are in the unityeditor namespace so for c# scripts you need to add "using unityeditor;" at the beginning of the script.

注意:這是一個編輯器類,如果想使用它你需要把它放到工程目錄下的assets/editor文件夾下。編輯器類在unityeditor命名空間下。所以當使用c#腳本時,你需要在腳本前面加上 "using unityeditor"引用。

variables變量

assetpath

the path name of the asset for this importer (read only)

用于這個導入器,資源的路徑名(只讀)。

class functions類函數

getatpath

retrieves the asset importer for the asset at path.

為所在路徑的資源,導入器重新獲取資源。

inherited members繼承成員

inherited variables繼承變量

name

the name of the object. //物體的名字

hideflags

should the object be hidden, saved with the scene or modifiable by the user?

物體是否被隱藏、保存在場景中或被用戶修改?

inherited functions繼承函數

getinstanceid

returns the instance id of the object.

返回物體的實例id

tostring

returns the name of the game object.

返回游戲物體的名稱。

inherited class functions繼承類函數

destroy

removes a gameobject, component or asset.

刪除一個游戲物體、組件或資源

destroyimmediate

destroys the object obj immediately. it is strongly recommended to use destroy instead.

立即銷毀物體obj,強烈建議使用destroy代替。

dontdestroyonload

makes the object target not be destroyed automatically when loading a new scene.

加載新場景的時候使目標物體不被自動銷毀。

findobjectoftype

returns the first active loaded object of type type.

返回type類型第一個激活的加載的物體。

findobjectsoftype

returns a list of all active loaded objects of type type.

返回type類型的所有激活的加載的物體列表

instantiate

clones the object original and returns the clone.

克隆原始物體,并返回克隆的物體

相關閱讀

文章點評
相關文章
女校游泳队彩金