Legacy Documentation: Version 2018.2 (Go to current version)
LanguageEnglish
  • C#

ReflectionProbe.defaultReflectionSet

Switch to Manual

Description

Adds a delegate to get notifications when the default specular Cubemap is changed.

See Also: ReflectionProbe.

using UnityEngine;
using UnityEngine.Rendering;

public class ReflectionProbeManager : MonoBehaviour { private static void OnSetDefaultReflection(Cubemap cubemap) { Debug.Log("Default reflection cubemap was changed."); }

void Start() { ReflectionProbe.defaultReflectionSet += OnSetDefaultReflection; }

void OnDestroy() { ReflectionProbe.defaultReflectionSet -= OnSetDefaultReflection; } }
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答