找回密碼
 注冊帳號

掃一掃,訪問微社區

application.loadleveladditive 累加關卡

2014-12-31 08:30| 發布者: 楊炎| 查看: 3478| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: application.loadleveladditive 累加關卡static functionloadleveladditive(index: int) : voidstatic functionloadleveladditive(name: string) : voiddescription描述loads a level additively.累加一個關卡,也就 ...

application.loadleveladditive 累加關卡

static functionloadleveladditive(index: int) : void

static functionloadleveladditive(name: string) : void

description描述

loads a level additively.

累加一個關卡,也就是說,加載一個新的場景,當前場景不會被銷毀。

unlikeloadlevel, loadleveladditive does not destroy objects in the current level. objects from the new level are added to the current scene. this is useful for creating continuous virtual worlds, where more content is loaded in as you walk through the environment.

不像loadlevel,loadleveladditive不銷毀當前關卡的物體。物體從新的關卡添加到當前的場景。這對創建連續的虛擬世界很有用,在你漫步環境,更多的內容被加載進來。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

application.loadleveladditive(1);

application.loadlevel("morestuff");

}

}

// loads the level with index 1

//加載關卡索引為1的關卡

application.loadleveladditive (1);

// load the level named "morestuff".

//加載名為morestuff的關卡

application.loadlevel ("morestuff");

文章點評
极速时时彩开奖最快的网站