From 377f65a919d3040b338c9c2e17d037c5b8064c7c Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Wed, 22 Mar 2023 11:05:29 -0400 Subject: [PATCH] fix(FadeInOut): Added OnValidate --- Assets/Mirror/Examples/AdditiveLevels/Scripts/FadeInOut.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Mirror/Examples/AdditiveLevels/Scripts/FadeInOut.cs b/Assets/Mirror/Examples/AdditiveLevels/Scripts/FadeInOut.cs index a9a27af72..fbb47c7c0 100644 --- a/Assets/Mirror/Examples/AdditiveLevels/Scripts/FadeInOut.cs +++ b/Assets/Mirror/Examples/AdditiveLevels/Scripts/FadeInOut.cs @@ -18,6 +18,12 @@ public class FadeInOut : MonoBehaviour float step; + void OnValidate() + { + if (fadeImage == null) + fadeImage = GetComponentInChildren(); + } + void Start() { // Convert user-friendly setting value to working value