[Unity] How to stop camera rendering?
http://answers.unity3d.com/questions/147988/how-to-pause-the-main-camera-.html
I would simply pause the game with Time.timeScale = 0, and then do the following commands to Camera.main:
- Save the Camera's CullingMask into a variable.
- Save the Camera's ClearFlags into a varible.
- Set the Camera's ClearFlags to Nothing. This will make it so that the previous frame's image will not be cleared.
- Set the Camer'as Culling Mask to 0. This makes it so that NOTHING is rendered.
- The Camera should now display the image of the previous frame permanently.
- When the game is unpaused, reset the CullingMask and ClearFlags values to what they were before.
Also, when you setup a script to do this, DO NOT use Update or LateUpdate to perform these tasks because they will not be called if the game is paused.
http://forum.unity3d.com/threads/47069-Stop-Camera-Rendering
Set the camera object inactive or disable the camera component.
GameObject.Find only finds active objects.
[Unity] How to stop camera rendering?的更多相关文章
- unity, 替换shader渲染(Rendering with Replaced Shaders)
实现特效,尤其是一些后处理特效,经常需要将各物体的shader替换为另一套shader进行渲染到纹理,再后再进行合成或以某种叠加方式叠加到最后的画面上去. 再复杂一点儿的,可能不同的物体所用的替换sh ...
- unity, 替换shader渲染(Rendering with Replaced Shaders)【转】
实现特效,尤其是一些后处理特效,经常需要将各物体的shader替换为另一套shader进行渲染到纹理,再后再进行合成或以某种叠加方式叠加到最后的画面上去. 再复杂一点儿的,可能不同的物体所用的替换sh ...
- Unity C# 一些关于Camera的心得!
本文原创,转载请注明出处:http://www.cnblogs.com/AdvancePikachu/p/6856374.html 首先,总结了下最近工作中关于摄像机漫游的功能, 脚本如下: Tran ...
- Unity shader学习之Forward Rendering Path
Forward rendering path shader如下: // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObje ...
- Unity Lighting - Choosing a Rendering Path 选择渲染路径(三)
Choosing a Rendering Path 选择渲染路径 Unity supports a number of rendering techniques, or ‘paths’. An i ...
- [原]Unity3D深入浅出 - 摄像机组件(Camera)
在Unity中创建一个Camera后,除了默认带一个Transform组件外,还会附带Flare Layer.GUI Layer.Audio Listener等4个组件,如下图. ClearFlags ...
- Unity NGUI 网络斗地主 -界面制作
Unity NGUI 网络斗地主 -界面制作 源文件在群(63438968群共享!) @灰太龙 这一节说一下NGUI的界面摆放,并且教会大家使用NGUI的自适应功能! 在这里感谢@Gamer,是他给我 ...
- Unity事件处理机制与NGUI事件机制
1 Unity原生 1.1 GUI void OnGUI(){ if(GUI.Button(Rect position, string text)){ //点击后立即执行 } 1.1 Input 每个 ...
- unity 的视锥剔除和遮挡剔除
Regular frustum culling only renders objects within the camera’s view. This is automatic and always ...
随机推荐
- SecureCRT自动登陆到服务器的脚本以及脚本编写简单说明
http://blog.csdn.net/marising/article/details/6409196 Secure用SSH登陆服务器时,如果服务器较多,登陆一次很麻烦,所以,可以自己编写VBSc ...
- 安装java memcached client到本地maven repository
由于目前java memcached client没有官方的maven repository可供使用,因此使用时需要手动将其安装到本地repository.java memcached client的 ...
- [jobdu]把数组排成最小的数
这道题见过,就是把相加的结果作为比较来排序就行了.注意的是comp函数里面要用const引用.而且c++里的字符串直接操作(读入和相加)也很方便. #include <iostream> ...
- 第二章 LM3S USB处理器
2.1 LM3S处理器简介 Luminary Micr公司Stellaris所提供一系列的微控制器是首款基于Cortex-m3的控制器,它们为对成本尤其敏感的嵌入式微控制器应用方案带来了高性能的32位 ...
- Android USB Host与HID通讯 (一)
去年9月份来到现在的公司,接到新公司的第一个项目就是Android USB Host与HID通讯,当时也什么都不懂,就拿着google的api 开发指南 (http://developer.andro ...
- 滑动RecyclerView时出现异常: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 6(offset:6).state:30
RecyclerView 存在的一个明显的 bug 一直没有修复: java.lang.IndexOutOfBoundsException: Inconsistency detected. Inval ...
- Android WebView 开发详解(三)
转载请注明出处 http://blog.csdn.net/typename/article/details/40302351 powered by miechal zhao 概览 Android ...
- 【HDOJ】1071 The area
数学题,先求抛物线和直线的系数,再利用积分公式求面积. #include <stdio.h> #include <math.h> int main() { double x1, ...
- WordPress Contact Form 7插件任意文件上传漏洞
漏洞名称: WordPress Contact Form 7插件任意文件上传漏洞 CNNVD编号: CNNVD-201311-415 发布时间: 2013-11-28 更新时间: 2013-11-28 ...
- MongoDB 权限 验证
在MongoDB中,服务启动默认是没有权限验证的,就安全性方面来说,这肯定是不行的,所以需要加上权限验证. 既然是要进行权限验证,那肯定是得有用户的吧,所以权限验证的第一步就是给MongoDB库添加用 ...