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. 【Netty】netty学习之nio了解

    [一]五种IO模型: (1)阻塞IO(2)非阻塞IO(任务提交,工作线程处理,委托线程等待工作线程处理结果的同时,也可以做其他的事情)(3)IO复用模型.(委托线程接收多个任务,将任务提交给工作线程. ...

  2. Python猴子补丁

    属性在运行时的动态替换,叫做猴子补丁(Monkey Patch). 为什么叫猴子补丁 属性的运行时替换和猴子也没什么关系,关于猴子补丁的由来网上查到两种说法: 1,这个词原来为Guerrilla Pa ...

  3. maven docker plugin 常见问题解决

    1. maven 项目必须使用小写,不然会一直有500 的错误    500: HTTP 500InternalServerError     2. docker server  连接数超了 Fail ...

  4. Spring注入方式及用到的注解

    注入方式: 把DAO实现类注入到service实现类中,把service的接口(注意不要是service的实现类)注入到action中,注 入时不要new 这个注入的类,因为spring会自动注入,如 ...

  5. oracle 卸载操作

    1. 用 oracle 用户登录 如果要再次安装, 最好先做一些备份工作. 包括用户的登录脚本,数据库自动启动关闭的脚本,和 Listener 自动启动的脚本. 要是有可能连创建数据库的脚本也保存下来 ...

  6. Django CBV与FBV

    FBV FBV(function base views) 就是在视图里使用函数处理请求. CBV CBV(class base views) 就是在视图里使用类处理请求. Python是一个面向对象的 ...

  7. VoIP常见编码的带宽计算

    voip带宽计算VOIP计算方法与所选用的编码方法有关,而与哪个厂家的没有什么关系,公式如下: 带宽=包长度×每秒包数=包长度×(1/打包周期)=(Ethernet头+IP头+UDP头+RTP头+有效 ...

  8. Hibernate学习5—Hibernate操作对象2

    第二节:Session 常用方法讲解 2)load和get()方法: 数据库中不存在与OID 对应的记录,Load()方法会抛出异常: load方法默认采用延迟加载,load出来的对象是一个代理类.开 ...

  9. 洗碗机耗材:finish 亮碟 产品的选购

    转发&补充两点 1.亮碟在国内销售的洗涤块是最低端的Classic,二合一产品(理论上必须配合软水盐和亮碟剂).国外很早就淘汰掉Classic级的洗涤块了,当前最低端的是Advanced(四合 ...

  10. 手游[追忆之青]动画导演:2D动画制作技巧

    转自:http://www.gamelook.com.cn/2016/09/264591 GameLook报道/由一般法人计算机娱乐协会(CESA)主办的CEDEC2016日前在日本横滨举行,诸多开发 ...