Version: Unity 6 Preview (6000.0)
Language : English
Cookies
Apply a cookie

Introduction to cookies

An example of baked fake caustics achieved using baked light cookies.
An example of baked fake caustics achieved using baked light cookies.

A cookie is a mask that you place on a Light to create a shadow with a specific shape or color, which changes the appearance and intensity of the Light.

Cookies are an efficient way of simulating complex lighting effects with minimal or no runtime performance impact. Effects you can simulate with cookies include caustics, soft shadows, and light shapes.

Spot lights with cookies can be extremely effective for creating the effect of light coming in from a window.

If you create a Texture that contains an alpha channel and assign it to the Cookie variable of the light, the cookie is projected from the light. The cookie’s alpha mask modulates the light’s brightness, creating light and dark spots on surfaces. This is a great way to add complexity or atmosphere to a sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
.

Render pipeline compatibility

See render pipeline feature comparison for more information about support for cookies across render pipelinesA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
.

Additional resources

Cookies
Apply a cookie