Commit 02f61778cd032e5ed9e4213d8b60942cbd88616e
1 parent
b0f4c4ef
Exists in
master
and in
1 other branch
Fix connection exceptions
Showing
2 changed files
with
29 additions
and
5 deletions
Show diff stats
Assets/Scenes/Main.unity
... | ... | @@ -10184,7 +10184,7 @@ RectTransform: |
10184 | 10184 | m_AnchorMin: {x: 1, y: 0} |
10185 | 10185 | m_AnchorMax: {x: 1, y: 1} |
10186 | 10186 | m_AnchoredPosition: {x: 0, y: 0} |
10187 | - m_SizeDelta: {x: 41.42856, y: 0} | |
10187 | + m_SizeDelta: {x: 53.71428, y: 0} | |
10188 | 10188 | m_Pivot: {x: 1, y: 0} |
10189 | 10189 | --- !u!114 &1371075866 |
10190 | 10190 | MonoBehaviour: | ... | ... |
Assets/Scripts/Export Video/ExportVideo.cs
... | ... | @@ -72,7 +72,7 @@ public class ExportVideo : MonoBehaviour { |
72 | 72 | } |
73 | 73 | |
74 | 74 | |
75 | - private void onClickExport() | |
75 | + public void onClickExport() | |
76 | 76 | { |
77 | 77 | PlayerLogger.Log("ExportVideo", "OnClickExport", "Starting Export..."); |
78 | 78 | |
... | ... | @@ -166,7 +166,7 @@ public class ExportVideo : MonoBehaviour { |
166 | 166 | * shows the progress bar while getting video info*/ |
167 | 167 | public void startExport() |
168 | 168 | { |
169 | - // new AndroidToast().showToast("Gerando Video...", "SHORT"); | |
169 | + new AndroidToast().showToast("Gerando Video...", "SHORT"); | |
170 | 170 | screenManager.changeExportStates(ExportLayers.ExportLayer.Export_Layer, false); |
171 | 171 | |
172 | 172 | screenManager.changeExportStates(ExportLayers.ExportLayer.Progress_Layer, true); |
... | ... | @@ -307,7 +307,15 @@ public class ExportVideo : MonoBehaviour { |
307 | 307 | { |
308 | 308 | |
309 | 309 | screenManager.changeExportStates(ExportLayers.ExportLayer.All, true); |
310 | + if (videoInfoRequest.error.ToLower().Contains("connection refused")) | |
311 | + { | |
312 | + GetConnectionStatusError(ExportLayers.ConnectionStatusError.ERROR_CONNECTION_FAILURE); | |
313 | + | |
314 | + } | |
315 | + else | |
316 | + { | |
310 | 317 | GetConnectionStatusError(ExportLayers.ConnectionStatusError.INTERNET_CONNECTION_FAILURE); |
318 | + } | |
311 | 319 | PlayerLogger.Log("ExportVideo", "requestVideoInfo", "(WWW) Error: " + videoInfoRequest.error); |
312 | 320 | |
313 | 321 | } |
... | ... | @@ -389,7 +397,15 @@ public class ExportVideo : MonoBehaviour { |
389 | 397 | { |
390 | 398 | |
391 | 399 | screenManager.changeExportStates(ExportLayers.ExportLayer.All, true); |
392 | - GetConnectionStatusError(ExportLayers.ConnectionStatusError.INTERNET_CONNECTION_FAILURE); | |
400 | + if (videoStatusRequest.error.ToLower().Contains("connection refused")) | |
401 | + { | |
402 | + GetConnectionStatusError(ExportLayers.ConnectionStatusError.ERROR_CONNECTION_FAILURE); | |
403 | + | |
404 | + } | |
405 | + else | |
406 | + { | |
407 | + GetConnectionStatusError(ExportLayers.ConnectionStatusError.INTERNET_CONNECTION_FAILURE); | |
408 | + } | |
393 | 409 | PlayerLogger.Log("ExportVideo", "VideoStatus", "(WWW) Error: " + videoStatusRequest.error); |
394 | 410 | break; |
395 | 411 | |
... | ... | @@ -478,7 +494,15 @@ public class ExportVideo : MonoBehaviour { |
478 | 494 | |
479 | 495 | if (DownloadVideo.error != null) |
480 | 496 | { |
481 | - GetConnectionStatusError(ExportLayers.ConnectionStatusError.INTERNET_CONNECTION_FAILURE); | |
497 | + if (DownloadVideo.error.ToLower().Contains("connection refused")) | |
498 | + { | |
499 | + GetConnectionStatusError(ExportLayers.ConnectionStatusError.ERROR_CONNECTION_FAILURE); | |
500 | + | |
501 | + } | |
502 | + else | |
503 | + { | |
504 | + GetConnectionStatusError(ExportLayers.ConnectionStatusError.INTERNET_CONNECTION_FAILURE); | |
505 | + } | |
482 | 506 | ErrorDownloading(); |
483 | 507 | |
484 | 508 | } | ... | ... |