From dca900cf76ec8d9dde4d60d36bebfa00700a4e6c Mon Sep 17 00:00:00 2001 From: hecomi Date: Mon, 11 Feb 2019 11:38:28 +0900 Subject: [PATCH] set UwcWindowTexture.window before onWindowChanged invoke #10. --- Assets/uWindowCapture/Scripts/UwcWindowTexture.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;