We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02b61b9 commit f3b42d8Copy full SHA for f3b42d8
1 file changed
Assets/uWindowCapture/Scripts/UwcWindow.cs
@@ -350,9 +350,14 @@ void CreateWindowTexture(bool force = false)
350
if (backTexture_) {
351
Object.DestroyImmediate(backTexture_);
352
}
353
- backTexture_ = new Texture2D(w, h, TextureFormat.BGRA32, false);
354
- Lib.SetWindowTexturePtr(id, backTexture_.GetNativeTexturePtr());
355
- willTextureSizeChange_ = true;
+ try {
+ backTexture_ = new Texture2D(w, h, TextureFormat.BGRA32, false);
+ Lib.SetWindowTexturePtr(id, backTexture_.GetNativeTexturePtr());
356
+ willTextureSizeChange_ = true;
357
+ } catch (System.Exception e) {
358
+ Debug.LogError(e.Message);
359
+ Debug.LogErrorFormat("Width: {0}, Height: {1}", w, h);
360
+ }
361
362
363
0 commit comments