Adds a delegate to get notifications when the default specular Cubemap is changed.
Additional resources: ReflectionProbe.
using UnityEngine; using UnityEngine.Rendering;
public class ReflectionProbeManager : MonoBehaviour { private static void OnSetDefaultReflection(Texture cubemap) { Debug.Log("Default reflection cubemap was changed."); }
void Start() { ReflectionProbe.defaultReflectionTexture += OnSetDefaultReflection; }
void OnDestroy() { ReflectionProbe.defaultReflectionTexture -= OnSetDefaultReflection; } }