diff --git a/Assets/uWindowCapture/Scripts/UwcWindowTexture.cs b/Assets/uWindowCapture/Scripts/UwcWindowTexture.cs index a5d3cf6..489c1ec 100644 --- a/Assets/uWindowCapture/Scripts/UwcWindowTexture.cs +++ b/Assets/uWindowCapture/Scripts/UwcWindowTexture.cs @@ -158,8 +158,9 @@ public UwcWindow window window_.onCaptured.RemoveListener(OnCaptured); } - onWindowChanged_.Invoke(value, window_); + var old = window_; window_ = value; + onWindowChanged_.Invoke(window_, old); if (window_ != null) { shouldUpdateWindow = false;