pixelLightCount
The maximum number of pixel lights that should affect any object.
Read time 1 minuteLast updated 2 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static int pixelLightCount { get; set; }
Remarks
Important: This API is compatible only with the Built-In Render Pipeline, which is no longer supported. To limit the number of lights that affect each object in the Universal Render Pipeline (URP), use the Forward rendering path and set Lighting > Additional Lights > Per Object Limit in the URP Asset. The other rendering paths have no per-object light limit.
If there are more lights illuminating an object, the dimmest ones will be rendered as vertex lights.
Use this from scripting if you want to have finer control than offered by quality settings levels.
using UnityEngine;public class Example : MonoBehaviour{ void Start() { // Use at most one pixel light for every object QualitySettings.pixelLightCount = 1; }}
Additional Resources: Quality Settings.