LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

CameraEvent

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Defines a place in camera's rendering to attach CommandBuffer objects to.

Unity's rendering loop can be extended by adding so called "command buffers" at various points in camera rendering. For example, you could add some custom geometry to be drawn right after the skybox is drawn.

See Also: CommandBuffer, LightEvent, command buffers overview.

Variables

BeforeDepthTextureBefore camera's depth texture is generated.
AfterDepthTextureAfter camera's depth texture is generated.
BeforeDepthNormalsTextureBefore camera's depth+normals texture is generated.
AfterDepthNormalsTextureAfter camera's depth+normals texture is generated.
BeforeGBufferBefore deferred rendering G-buffer is rendered.
AfterGBufferAfter deferred rendering G-buffer is rendered.
BeforeLightingBefore lighting pass in deferred rendering.
AfterLightingAfter lighting pass in deferred rendering.
BeforeFinalPassBefore final geometry pass in deferred lighting.
AfterFinalPassAfter final geometry pass in deferred lighting.
BeforeForwardOpaqueBefore opaque objects in forward rendering.
AfterForwardOpaqueAfter opaque objects in forward rendering.
BeforeImageEffectsOpaqueBefore image effects that happen between opaque & transparent objects.
AfterImageEffectsOpaqueAfter image effects that happen between opaque & transparent objects.
BeforeSkyboxBefore skybox is drawn.
AfterSkyboxAfter skybox is drawn.
BeforeForwardAlphaBefore transparent objects in forward rendering.
AfterForwardAlphaAfter transparent objects in forward rendering.
BeforeImageEffectsBefore image effects.
AfterImageEffectsAfter image effects.
AfterEverythingAfter camera has done rendering everything.
BeforeReflectionsBefore reflections pass in deferred rendering.
AfterReflectionsAfter reflections pass in deferred rendering.