기술 자료

Unity Engine

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.
읽는 시간 1분최근 업데이트: 한 달 전

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; }}