Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


generateLightingData

Configures a trail to generate Normals and Tangents. With this data, Scene lighting can affect the trail via Normal Maps and the Unity Standard Shader, or your own custom-built Shaders.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public bool generateLightingData { get; set; }

Examples

using UnityEngine;using System.Collections;[RequireComponent(typeof(TrailRenderer))]public class ExampleClass : MonoBehaviour{ private TrailRenderer tr; void Start() { tr = GetComponent<TrailRenderer>(); tr.material = new Material(Shader.Find("Standard")); tr.generateLightingData = true; }}