找回密碼
 注冊帳號

掃一掃,訪問微社區

camera.onpostrender 在渲染之后

2015-1-4 03:47| 發布者: 楊炎| 查看: 3180| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: camera.onpostrender 在渲染之后functiononpostrender() : voiddescription描述onpostrender is called after a camera has finished rendering the scene.onpostrender 在相機渲染場景之后調用。this message is se ...

camera.onpostrender 在渲染之后

functiononpostrender() : void

description描述

onpostrender is called after a camera has finished rendering the scene.

onpostrender 在相機渲染場景之后調用。

this message is sent to all scripts attached to the camera.

這個消息被發送到所有附加在相機的腳本

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

private bool revertfogstate = false;

void onprerender() {

revertfogstate =rendersettings.fog;

rendersettings.fog= enabled;

}

void onpostrender() {

rendersettings.fog= revertfogstate;

}

}

// this script lets you enable/disable fog per camera.

//這個腳本讓你在每個相機開啟/禁用霧效

// by enabling or disabling the script in the title of the inspector

//在檢視面板開啟或禁用這個腳本

// you can turn fog on or off per camera.

//在每個相機可以開啟/禁用霧效

private var revertfogstate = false;

function onprerender () {

revertfogstate = rendersettings.fog;

rendersettings.fog= enabled;

}

function onpostrender () {

rendersettings.fog= revertfogstate;

}

相關閱讀

文章點評
相關文章
女校游泳队彩金