Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit c6f829c

Browse files
author
Yuncong Zhang
committed
Report emoji texture image load issue.
1 parent fe192fe commit c6f829c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Runtime/ui/painting/canvas_impl.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Net;
34
using Unity.UIWidgets.foundation;
45
using Unity.UIWidgets.material;
56
using UnityEngine;
@@ -770,6 +771,7 @@ void _drawTextBlob(TextBlob textBlob, Offset offset, Paint paint) {
770771
}
771772
else {
772773
Paint paintWithWhite = new Paint(p) {color = Colors.white};
774+
if (EmojiUtils.image == null) return;
773775
layer.draws.Add(CanvasShader.tex(layer, paintWithWhite, mesh.resolveMesh(), EmojiUtils.image));
774776
}
775777
};

Runtime/ui/txt/emoji.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using Unity.UIWidgets.foundation;
34
using UnityEngine;
45

56
namespace Unity.UIWidgets.ui {
@@ -14,8 +15,9 @@ public static Image image {
1415
Resources.Load<Texture2D>("Emoji")
1516
);
1617
}
17-
catch (Exception) {
18+
catch (Exception e) {
1819
_image = null;
20+
Debug.LogError(e.StackTrace);
1921
}
2022
}
2123

0 commit comments

Comments
 (0)