The Cookie texture type formats the texture asset so it’s suitable to use as a light cookie in the Built-in Render PipelineA 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. For this texture type, Unity updates the Texture Shape automatically based on the Light Type you select:
The Light Type property defines the light type that the editor applies the light cookie to. The different light types have different properties that have different recommended setup for the best effect.
Property | Description |
---|---|
Light Type | Select a light type from the dropdown options:
|
When you select this light type, Unity sets the Wrap Mode to Clamp by default. It’s recommended that you set the edges of the light cookie texture asset to solid black for the proper light effect.
When you select this light type, Unity sets the Wrap Mode to Repeat by default and the light cookie texture tiles.
Note: You can apply a cookie formatted for the Spot Light or Directional Light type to a Directional Light, but both have different effects. The Directional Light will repeat the Directional Light type in a tiled pattern, but will only project the Spot Light type cookie once.
When you select this light type, you can customize the Cube shape-specific texture properties.
The following are the other Cookie texture type property settings.
Property | Description |
---|---|
Alpha Source | Specifies how Unity generates the alpha value for the texture asset from the texture source file.
|
Alpha is Transparency | Indicates whether to dilate the color channels. This helps to avoid filtering artifacts on the edges of the alpha channel if the alpha channel represents transparency. |
Remove PSD Matte | Indicates whether to apply special processing for Photoshop files that use transparency (blending color pixels with white). Note: This is only available for PSD files. |
Non Power of 2 | Specifies how Unity scales the dimension size if the texture source file has a non-power of two (NPOT) dimension size. For more information on NPOT dimension sizes, see Importing Textures.
|
Read/Write | Indicates whether to access the texture data from scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info See in Glossary using Texture2D.SetPixels, Texture2D.GetPixels and other TextureAn image used when rendering a GameObject, Sprite, or UI element. Textures are often applied to the surface of a mesh to give it visual detail. More info See in Glossary methods. Internally, Unity uses a copy of the Texture data for script access, which doubles the amount of memory required for the Texture. This property is therefore disabled by default, and you should enable it only if you require script access. For more information, see Texture.isReadable. |
Generate Mipmap | Indicates whether to generate a mipmap for this texture. |
Mipmap Limit | Disable this option to use all mipmap levels, regardless of the Mipmap Limit settings in the Quality menu. This property only appears if you set Texture Shape to 2D or 2D Array. Other texture shapes always use all mipmap levels. |
Mipmap Limit Group | Select the Mipmap Limit group this texture should be part of. The default option is None (Use Global Mipmap Limit). This property only appears if you set Texture Shape to 2D or 2D Array. Other texture shapes always use all mipmap levels. |
Mipmap Filtering | Specifies the method Unity uses to filter mipmap levels and optimize image quality. This property is visible only when Generate Mipmap is enabled.
|
Preserve Coverage | Indicates whether the alpha channel in generated mipmaps preserves coverage during the alpha text. For more information, see TextureImporterSettings.mipMapsPreserveCoverage. This property is visible only when Generate Mipmap is enabled. |
Alpha Cutoff | The reference value that controls the mipmap coverage during the alpha test. This property is visible only when Preserve Coverage is enabled. |
Replicate Border | Indicates whether to stop colors bleeding out to the edge of the lower mipmap levels. This is useful for light cookies. This property is visible only when Generate Mipmap is enabled. |
Fadeout to Gray | Indicates whether mipmap levels should fade to gray as the mipmap levels progress. This is useful for detail maps. The left-most scroll is the first mipmap level to begin fading out. The right-most scroll defines the mipmap level where the texture is completely grayed out. This property is visible only when Generate Mipmap is enabled. |
Ignore PNG Gamma | Indicates whether to ignore the gamma attribute in PNG files. This option is only visible if the texture source file is a PNG. |
Swizzle | Specifies how to order the texture source file color channel data. |
Wrap Mode | Specifies how the texture behaves when it tiles.
|
Filter Mode | Specifies how Unity filters the texture when the texture stretches during 3D transformations.
|
Aniso LevelThe anisotropic filtering (AF) level of a texture. Allows you to increase texture quality when viewing a texture at a steep angle. Good for floor and ground textures. More info See in Glossary |
Controls the texture quality when you view the texture at a steep angle. Anisotropic filtering is good for floor and ground Textures but is resource intensive. For more information, see Importing textures. |
In addition, you can use the Platform-specific overrides panel to set default options and overrides for specific platforms.