我 知道 Monobehaviour 上的 那些 event functions 是 在主线程 中 按 顺序调用的。这点从Manual/ExecutionOrder.html 上的 一张图就可以看出来。

既然按 顺序 调用,那么 如果 比如update 在这一次 调用的 时候 执行 了 大量的运算 导致 主线程 被堵塞。是不是 意味着 这之后的 event funstion 也被堵塞了。

测试一下:

 

 using UnityEngine;
using System.Collections; public class mTest : MonoBehaviour { //public GameObject tmp; int index1 = ;
void FixedUpdate()
{
Debug.Log(" mTest FixedUpdate " + Time.realtimeSinceStartup + " index1 : " + (index1++));
} int index = ; // Update is called once per frame
void Update () { if (index == )
{
for (int i = ; i < ; i++)
{
Debug.Log("nothing");
}
//Destroy(tmp);
//Debug.Log("test");
}
Debug.Log(" mTest Update " + Time.realtimeSinceStartup + " index : " + (index++));
} void LateUpdate()
{
Debug.Log(" mTest LateUpdate " + Time.realtimeSinceStartup);
}
}

上结果:

结果很奇怪,的确是堵塞了,但是FixUpdate 在 第 2 帧 被 执行多次。无语了。

Unity3D Script Execution Order ——Question的更多相关文章

  1. unity 脚本执行顺序设置 Script Execution Order Settings

     通过Edit->Project Settings->Script Execution Order打开MonoManager面板  或者选择任意脚本在Inspector视图中点击Execu ...

  2. Execution Order of Event Functions

    In Unity scripting, there are a number of event functions that get executed in a predetermined order ...

  3. Unity3D Script KeynoteII

    [Unity3D Script KeynoteII] 1.使用代码操作Particle. //粒子对象 GameObject particle = null; //粒子X轴方向速度 float vel ...

  4. Unity3D Script Keynote

    [Unity3D Script Keynote] 1.创建GameObject if(GUILayout.Button("创建立方体",GUILayout.Height(50))) ...

  5. Execution Order for the ApiController

    Execution Order for the ApiController Assuming the request goes into the ApiController scope, the op ...

  6. Increase PHP script execution time with Nginx

    If you have a large WordPress setup or a server with limited resources, then you will often see the ...

  7. [Javascript]2. Improve you speed! Script Execution

    Let's take a closer look at how a browser retrieves and acts on scripts.modern browser can parallel ...

  8. Test execution order

    刚开始的时候,JUnit并没有规定测试方法的调用执行顺序.方法通过映射的API返回的顺序进行调用.然 而,使用JVM顺序是不明智的,因为Java平台没有规定任何特定的顺序,事实上JDK7或多或少的返回 ...

  9. Execution Order In a Test Plan

    1.Config Element 2.Pre  Processors 3.Timer 4.Sampler 5.Post Processors 6.Assertions 7.Listener

随机推荐

  1. OC11_真正的代理

    // // ReceiveReportDelegate.h // OC11_真正的代理 // // Created by zhangxueming on 15/6/24. // Copyright ( ...

  2. template_12特化与重载

    1,重载函数模板f<int*>((int*)pi);//1f<int>((int*)pi);//2上面用int*替换第一个模板的T,用int来替换第二个模板的T.那么将得到两个 ...

  3. 驾照理论模拟考试系统Android源码下载

    ‍‍‍驾照理论模拟考试系统Android源码下载 <ignore_js_op> 9.png (55.77 KB, 下载次数: 0) <ignore_js_op> 10.png ...

  4. 6.struts登陆页面的演示

    1.创建一个web project "Struts_1" 添加struts的jar包 --在项目文件右键->myeclipse->add struts...       ...

  5. C# 语言如何获取json格式的数据,不用javascript用c#实现。。。

    {'state' : 1,'data':{'list':[{'id': 123, 'name': '诸葛天邪','level': 10,'country': 1,}]}} 比如我要获取里面的 id 该 ...

  6. Winform webBrowser 不跳转网页

    private void webBrowser1_NewWindow(object sender, CancelEventArgs e) { string url = ((WebBrowser)sen ...

  7. 初步了解SequoiaDB数据库

    随着企业中日益复杂与多变的需求,以及迅速扩展带来的海量数据的业务,IT部门需要将越来越多的信息提供给用户,同时在现今的全球经济背景环境下,IT部 门还需要在提供高效服务的同时,降低其设备与程序维护成本 ...

  8. [大牛翻译系列]Hadoop(9)MapReduce 性能调优:理解性能瓶颈,诊断map性能瓶颈

    6.2 诊断性能瓶颈 有的时候作业的执行时间会长得惊人.想靠猜也是很难猜对问题在哪.这一章中将介绍如何界定问题,找到根源.涉及的工具中有的是Hadoop自带的,有的是本书提供的. 系统监控和Hadoo ...

  9. Perl 关于 use strict 的用法

    什么场合要用 use strict 当你的程序有一定的行数时,尤其是在一页放不下时,或者是你找不到发生错误的原因时. 为什么要用 use strict? 众多的原因之一是帮你寻找因为错误拼写造成的错误 ...

  10. 新手自学ABAP(1)--数据类型

    一.DATA语句 1.TYPE type ex:  可以利用冒号声明多个变量. DATA : gv_num1 TYPE I,   gv_num2 TYPE I. 2.LIKE num   (num可以 ...