Select your preferred scripting language. All code snippets will be displayed in this language.
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.
CloseAutomatically choose the render mode.
This chooses whether to render the Light as a pixel or vertex light (recommended and default). See Also: light component.
// Set light's render mode to automatic light.renderMode = LightRenderMode.Auto;
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Example() { light.renderMode = LightRenderMode.Auto; } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def Example() as void: light.renderMode = LightRenderMode.Auto