Version: 2022.3
言語: 日本語
public Color color ;

説明

フレアのカラーを設定する。

いくつかの(有効になっている "Use Light Color" を持っている)フレアエレメントの色を制御します 。

関連項目: Lens flare component, flare assets.

using UnityEngine;

public class Example : MonoBehaviour { // Increments the strenght of the Lensflare lf when the Transform tr // gets closer to the Lens flare

public LensFlare lf; public Transform tr;

void Update() { lf.brightness = 1 / Vector3.Distance(lf.transform.position, tr.position); } }