application.loadleveladditive 累加关卡

2014-12-31 08:30| 发布者: 杨炎| 查看: 2867| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本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");

文章点评