久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

Resources.LoadAll 加載全部

 有趣的永 2015-07-13

Resources.LoadAll 加載全部

static function LoadAll (path : string, type : Type) : Object[]

Description描述

Loads all assets in a folder or file at path in the Resources folder.

加載Resources文件夾中的path文件夾或者文件中的所有資源。

If path refers to a folder, all assets in the folder will be returned. If path refers to a file, only that asset will be returned. Only objects of type will be returned. The path is relative to the Resources folder. The Resources folder can be anywhere inside the Assets folder.

如果path是一個文件夾,,文件中的所有資源都將被返回,。如果path為一個文件,只有這個資源將被返回,。只有type類型的物體將被返回,。Path相對于Resources文件夾。Resources文件夾可以在Assets文件夾中的任何位置,。

// Loads all assets in the "Resources/Textures" folder

// Then picks a random one from the list.

// Note: Random.Range in this case returns [low,high)

// range, i.e. the high value is not inclusive.

//加載"Resources/Texture"文件夾中所有資源

//然后從列表中選擇隨機的一個

//注意:Random.Range這里返回 [低,高)范圍,,例如,高值不包括在內(nèi),。

function Start (){

	var go = new GameObject.CreatePrimitive(PrimitiveType.Cube);

	var textures : Object[] = Resources.LoadAll("Textures", Texture2D);

	var texture : Texture2D = textures[Random.Range(0, textures.Length)];

	go.renderer.material.mainTexture = texture;

}

    本站是提供個人知識管理的網(wǎng)絡存儲空間,,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點,。請注意甄別內(nèi)容中的聯(lián)系方式,、誘導購買等信息,,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,,請點擊一鍵舉報,。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多