unity學習之特殊資料夾簡介

2021-09-25 12:36:56 字數 536 閱讀 6752

unity 中有些特殊資料夾可以用來存放資源,或者存放工具類檔案等,下面介紹:

editor:

可以放置在任何目錄之下,editor下的檔案不會被打包進發布包中。一般將工具類指令碼或dll檔案(編輯用)放置此資料夾下。

editor default resources 

須放在project檢視根目錄下,僅用於開發時使用,通過editorguiutility.load()讀取

gizmos

此資料夾可以放置用於會知某座標icon的,使用ondrawgizmos()方法,每幀都會執行。

plugins

做手遊開發的sd可以放在此資料夾下

resources

任何目錄下皆可,都會被打包進apk或ipa(壓縮檔案),通過resources.load()讀取。resources.loadassetpath()可讀取asset下的任意資源,編輯器編輯時用,路徑是「asset/***/***.字尾名」。assetdatabase.loadassetpath()只能編輯時使用

streamingassets

Unity 特殊資料夾

editor 資料夾中的指令碼主要用來擴充套件unity編輯器功能。這些指令碼不會被打包進最終發布的遊戲中。可以存在多個editor資料夾,此資料夾中的指令碼不能當gameobject的元件。editor default resources 使用editor資料夾拓展編輯器功能時,可以用editor...

Unity特殊資料夾詳解

這裡列舉出手遊開發中用到的縮影特殊資料夾。editor資料夾可以在根目錄下,也可以在子目錄裡,只要名子叫editor就可以。比如目錄 editor 和 editor 是一樣的,無論多少個叫editor的資料夾都可以。editor下面放的所有資源檔案或者指令碼檔案都不會被打進發布包中,並且指令碼也只能...

Unity 所有特殊資料夾

1.editor 2.editor default resources editor default resources注意中間是有空格的,它必須放在project檢視的根目錄下,如果你想放在 editor default resources 這樣是不行的。你可以把編輯器用到的一些資源放在這裡,比如...