Version: 2018.4
public float intensity ;

説明

ライトの強度はライトのカラーで乗算されます。

値は 0 と 8 の間にできます。これで明るい光を作成することができます。

using UnityEngine;

public class Example : MonoBehaviour { // Interpolate light color between two colors back and forth float duration = 1.0f; Color color0 = Color.red; Color color1 = Color.blue;

Light lt;

void Start() { lt = GetComponent<Light>(); }

void Update() { // set light color float t = Mathf.PingPong(Time.time, duration) / duration; lt.color = Color.Lerp(color0, color1, t); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961