Camera翻译:Yīm
- actualRenderingPath
- allCameras
- aspect
- backgroundColor
- cameraToWorldMatrix
- clearFlags
- CopyFrom
- cullingMask
- current
- depthTextureMode
- depth
- farClipPlane
- fieldOfView
- layerCullDistances
- main
- nearClipPlane
- OnPostRender
- OnPreCull
- OnPreRender
- OnRenderImage
- OnRenderObject
- OnWillRenderObject
- orthographicSize
- orthographic
- pixelHeight
- pixelRect
- pixelWidth
- projectionMatrix
- rect
- renderingPath
- RenderToCubemap
- RenderWithShader
- Render
- ResetAspect
- ResetProjectionMatrix
- ResetReplacementShader
- ResetWorldToCameraMatrix
- ScreenPointToRay
- ScreenToViewportPoint
- ScreenToWorldPoint
- SetReplacementShader
- targetTexture
- velocity
- ViewportPointToRay
- ViewportToScreenPoint
- ViewportToWorldPoint
- worldToCameraMatrix
- WorldToScreenPoint
- WorldToViewportPoint
Camera.OnPostRender 在渲染之后
function OnPostRender () : 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.
这个消息被发送到所有附加在相机的脚本。
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;
}
最后修改:2011年3月7日 Monday 15:58