File tree 3 files changed +16
-9
lines changed
3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -5641,7 +5641,7 @@ MonoBehaviour:
5641
5641
m_HorizontalOverflow : 0
5642
5642
m_VerticalOverflow : 0
5643
5643
m_LineSpacing : 1
5644
- m_Text : Result
5644
+ m_Text :
5645
5645
--- !u!222 &1188234761
5646
5646
CanvasRenderer :
5647
5647
m_ObjectHideFlags : 0
@@ -8189,7 +8189,7 @@ MonoBehaviour:
8189
8189
m_HorizontalOverflow : 0
8190
8190
m_VerticalOverflow : 0
8191
8191
m_LineSpacing : 1
8192
- m_Text : Camera
8192
+ m_Text : Turn on Camera
8193
8193
--- !u!222 &1497582429
8194
8194
CanvasRenderer :
8195
8195
m_ObjectHideFlags : 0
Original file line number Diff line number Diff line change @@ -192,11 +192,11 @@ public void StartGenerate()
192
192
193
193
IEnumerator Co_GenerateSingle ( )
194
194
{
195
- Debug . Log ( "start generate" ) ;
196
- yield return null ;
197
195
isProcessing = true ;
198
196
onGenerate = true ;
199
197
198
+ yield return null ;
199
+
200
200
int maxContent = 1 ;
201
201
int currentIndex = 0 ;
202
202
@@ -213,9 +213,10 @@ IEnumerator Co_GenerateSingle()
213
213
214
214
currentFileNameText . text = string . Format ( "File name: {0}" , currentFileName ) ;
215
215
216
- qrCodeEncodeController . Encode ( singleMode . text ) ;
216
+ int code = qrCodeEncodeController . Encode ( singleMode . text ) ;
217
217
yield return new WaitUntil ( ( ) => onGenerate == false ) ;
218
-
218
+ Debug . Log ( code ) ;
219
+
219
220
currentIndex ++ ;
220
221
progressText . text = string . Format ( "{0}/{1}" , currentIndex , maxContent ) ;
221
222
progressBarImage . fillAmount = ( float ) currentIndex / ( float ) maxContent ;
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ IEnumerator Initialize()
79
79
80
80
private void OnQRScaned ( string msg )
81
81
{
82
- DisplayResult ( msg ) ;
82
+ StartCoroutine ( _DisplayResult ( msg ) ) ;
83
83
84
84
if ( autoResetToggle . isOn )
85
85
{
@@ -207,12 +207,18 @@ private void ReadFile(string path)
207
207
private void TextureDecode ( Texture2D texture )
208
208
{
209
209
string msg = QRCodeDecodeController . DecodeByStaticPic ( texture ) ;
210
- DisplayResult ( msg ) ;
210
+ StartCoroutine ( _DisplayResult ( msg ) ) ;
211
211
}
212
212
213
- private void DisplayResult ( string msg )
213
+
214
+ IEnumerator _DisplayResult ( string msg )
214
215
{
216
+ resultText . gameObject . SetActive ( false ) ;
215
217
resultText . text = string . Format ( "{0}" , msg ) ;
218
+
219
+ yield return null ;
220
+
221
+ resultText . gameObject . SetActive ( true ) ;
216
222
resetButton . gameObject . SetActive ( true ) ;
217
223
}
218
224
}
You can’t perform that action at this time.
0 commit comments