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.
#pragma strict private var tr: TrailRenderer; function Start() { tr = GetComponent.<TrailRenderer>(); tr.material = new Material(Shader.Find("Standard")); tr.generateLightingData = true; }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { private TrailRenderer tr;
void Start() { tr = GetComponent<TrailRenderer>(); tr.material = new Material(Shader.Find("Standard")); tr.generateLightingData = true; } }