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. MSDN中回调函数的讲解及其C#例子:用委托实现回调函数

    转自:http://blog.csdn.net/sizheng0320/article/details/1615777 ms-help://MS.MSDNQTR.2003FEB.2052/cpguid ...

  2. Android学习路线总结,绝对干货(转)

    title: Android学习路线总结,绝对干货tags: Android学习路线,Android学习资料,怎么学习androidgrammar_cjkRuby: true--- 一.前言 不知不觉 ...

  3. autoconf 添加三方库(libcurl)简单试用

    1. 参考项目 https://github.com/rongfengliang/autoconf-project 2. 项目说明 a. 项目结构 ├── Jenkinsfile # jenkins ...

  4. Gixy Nginx 配置分析工具

    项目简介 Gixy 是一款用来分析 Nginx 配置的工具. Gixy 的主要目标是防止安全配置错误,并自动进行缺陷检测. 目前支持的 Python 版本是 2.7 和 3.5+ . 免责声明:Gix ...

  5. 使用dnSpy对目标程序(EXE或DLL)进行反编译修改并编译运行

    本文为原创文章.源代码为原创代码,如转载/复制,请在网页/代码处明显位置标明原文名称.作者及网址,谢谢! 本文使用的工具下载地址为: https://github.com/cnxy/dnSpy/arc ...

  6. appium+python自动化29-toast

    注意 toast要appium1.6.3以上版本才支持,appium1.4的版本就别浪费时间了 Supported Platforms 1.查看appium v1.7版本官方文档 Supported ...

  7. [转]加密经验集 => C#

    下载地址 代码摘自 C#高级编程(第7版) 第579页 不对称加密

  8. H3C IRF2的三种配置情况

    H3C-IRF2-虚拟交换技术-强列鼻视看我文档不下载的呵呵.看了下面的东西你就会配IRF了. H3C-5120-HI  H3C-5120S   H3C5800 先到H3C官网上面看那些交换机支持IR ...

  9. ECMAScript有6种继承方式(实现继承)

    本人对于ECMAScript继承机制有些见解,如果说的不对,敬请赐教~~~~ 继承是OO语言(面向对象)挺好的概念,许多OO语言都支持两种继承方式(接口只继承方法签名.实际继承则继承实际的方法),但是 ...

  10. SSMS安装英文版后无法修改为中文

    SSMS的UI语言和所安装的Visual Studio的语言是相关的,你这种情况应该是第一次安装的时候安装了英文版的visual studio isolated shell,在卸载的时候你没有卸载这个 ...