找回密碼
 注冊帳號

掃一掃,訪問微社區

assetdatabase.loadassetatpath 指定路徑加載資源

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

摘要: assetdatabase.loadassetatpath 指定路徑加載資源static functionloadassetatpath(assetpath: string,type: type) :objectdescription描述returns the first asset object of type type at given path assetpath.返 ...

assetdatabase.loadassetatpath 指定路徑加載資源

static functionloadassetatpath(assetpath: string,type: type) :object

description描述

returns the first asset object of type type at given path assetpath.

返回在指定位置assetpath下第一個類型是type的資源對象

some asset files may contain multiple objects. (such as a maya file which may contain multiple meshes and gameobjects). all paths are relative to the project folder. like: "assets/mytextures/hello.png".

有些資源文件可能包含許多對象。(例如一個maya文件可能包含許多個網格和游戲物體)。所有的路徑都是相對于工程目錄文件. 例如” assets/mytextures/hello.png”

note: the assetpath parameter is not needed to be case sensitive. all asset names & paths in unity are with forward slashes.

注意:參數assetpaht不需要區分大小寫。在unity中所有的資源名稱和路徑都需要斜杠/。

參見:assetdatabase.loadmainassetatpath,assetdatabase.loadallassetsatpath

相關閱讀

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