Application.LoadLevel

  

  只有在File->Build Setting中设置了的按钮才能被加载。

  当level加载完成后,MonoBehaviour.OnLevelWasLoaded is called on all active game objects。

  When loading a new level all game objects that have been loaded before are destroyed. If you want to let an object survive when loading a new level, use Object.DontDestroyOnLoad.

  Calling LoadLevel will update Application.loadedLevel and Application.loadedLevelName.

参考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/ScriptReference/Application.LoadLevel.html

Object.DontDestroyOnLoad

  When loading a new level all objects in the scene are destroyed, then the objects in the new level are loaded. In order to preserve an object during level loading call DontDestroyOnLoad on it. If the object is a component or game object then its entire transform hierarchy will not be destroyed either.

参考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/ScriptReference/Object.DontDestroyOnLoad.html

Application.LoadLevel & Object.DontDestroyOnLoad的更多相关文章

  1. jexus System.BadImageFormatException Details: Non-web exception. Exception origin (name of application or object): App_global.asax_ai3fjolq.

    Application ExceptionSystem.BadImageFormatExceptionInvalid method header format 0Description: HTTP 5 ...

  2. Kippo-Failed to load application: 'module' object has no attribute 'IPluggableAuthenticationModules'

    Kippo-Failed to load application: 'module' object has no attribute 'IPluggableAuthenticationModules' ...

  3. Unity3D Object.DontDestroyOnLoad 备忘

    初学Untiy3D,记录备忘. public static void DontDestroyOnLoad(Object target); Makes the object target not be ...

  4. 混用Application.LoadLevel 和 PhotonNetwork.LoadLevel

    最近这一周从上周五晚上加完班回家夜里都12点了. 又赶紧送孩子去儿童医院  .. 就肺炎住院了.  真是有啥别有病呢.  悲剧的是我周三夜里陪了一夜后. 转天晚上也发烧了.. 周四 周五输了两天液. ...

  5. Application.LoadLevel

    Unity在场景切换之间清理下内存 http://www.cnblogs.com/dongz888/p/4920714.html

  6. unity3d 场景间数据传递

    在游戏项目中,常常会使用到用户信息,获取信息当然可以从数据库中获取.但是对场景多的游戏这样做是不正确的,那么我我们就需要再第一次获取用户信息之后, 同时在其它的场景中共享用户数据,避免对服务器增加负担 ...

  7. u3d DontDestroyOnLoad多场景问题

    using UnityEngine; using System.Collections; public class DontDel : MonoBehaviour { public GameObjec ...

  8. unity3d中的DontDestroyOnLoad来回切换出现多个实例问题

    在用Unity3D开发游戏中,我们会经常创建多个场景,但是在场景过度的时候,通常场景中的对象会被删除.所以Unity3D给了我们一个不删除前一个 场景中的某一个对象或者脚本的API,那就是“DontD ...

  9. 使用Microsoft Web Application Stress Tool对web进行压力测试

    Web压力测试是目前比较流行的话题,利用Web压力测试可以有效地测试一些Web服务器的运行状态和响应时间等等,对于Web服务器的承受力测试是个非常好的手法.Web 压力测试通常是利用一些工具,例如微软 ...

随机推荐

  1. TCP和UDP通信(C#网络编程) ---- 系列文章

    文章系列目录 C#网络编程系列文章(一)之Socket实现异步TCP服务器 C#网络编程系列文章(二)之Socket实现同步TCP服务器 C#网络编程系列文章(三)之TcpListener实现异步TC ...

  2. div,css常用技术

    1,<div></div>一张图作为背景的用法: 必须指定width,height,background属性 .smallCircle{ margin-top: 25px;   ...

  3. (QPS)TPS指标概述

    性能测试关注指标-TPS概述 一.TPS(Transaction per Second)定义 TPS是Transactions Per Second 的缩写,也就是事务数/秒.它是软件测试结果的测量单 ...

  4. Bash命令查找本机公网IP

    用Bash命令查找本机公网IP wget -qO - http://ipecho.net/plain; echo

  5. php 实现四种排序两种查找

    function bubbleSort($arr){ $len = count($arr); if($len<=1) { return $arr; } for ($i=0;$i<$len; ...

  6. [Java.Web]从零开始布署 Tomcat

    1. 下载 JRE 1.7 2. 下载 Tomcat 7.0.77,我使用的是红圈的压缩包版本,也可以使用绿圈的安装包版本[更省心] 3. 加入环境变量 JRE_HOME .CATALINA_HOME ...

  7. Docker - 记录在window 上的一些“坑”

    前言 由于领导要在超极本上面演示一些东西,所以决定在window平台上面使用docker,于是乎,便有了下面的一些故事... CPU / Memery 的总体设置 众所周知,在Linux上面使用doc ...

  8. Linux学习笔记 - Shell 函数的使用

    基本语法 funname () { action; return -)):如果不加,将以最后一条命令运行结果,作为返回值. } 示例1:定义并调用无返回值的函数 #!/bin/bash a= b= c ...

  9. 第六章 通过Service访问Pod(中)

    6.2 Cluster IP 底层实现 Cluster IP 是一个虚拟IP,是由K8s节点上的iptables规则管理的. 使用类似轮询的方法访问Pod. 6.3 DNS 访问Service 在Cl ...

  10. @BindingAnnotation

    (1) 如果 一个接口只有一个实现,使用这种连接注解就可以: bind(XXInterface.class).to(XXImpl.class); @Inject XXInterface xxInter ...