diff --git a/Assets/AddressableAssetsData/Android/addressables_content_state.bin b/Assets/AddressableAssetsData/Android/addressables_content_state.bin index c366965e7..30565340f 100644 Binary files a/Assets/AddressableAssetsData/Android/addressables_content_state.bin and b/Assets/AddressableAssetsData/Android/addressables_content_state.bin differ diff --git a/Assets/Script/Main/MainToTitle.cs b/Assets/Script/Main/MainToTitle.cs index 8e6a9769d..81d851a0f 100644 --- a/Assets/Script/Main/MainToTitle.cs +++ b/Assets/Script/Main/MainToTitle.cs @@ -34,11 +34,9 @@ public class MainToTitle : MonoBehaviour IEnumerator Co_CheckDownload() { - //yield return Addressables.InitializeAsync(); - label_slider.text = ""; - long downloadSize = 0; - int completedDownloads = 0; + long totalDownloadSize = 0; + long currentDownloadedSize = 0; // 현재까지 다운로드된 용량 int totalLabels = addr_Labels.Count; var labels = new List(); @@ -51,7 +49,7 @@ public class MainToTitle : MonoBehaviour bool calcSuccess = false; for (int retry = 0; retry < retryLimit; retry++) { - downloadSize = 0; + totalDownloadSize = 0; calcSuccess = true; foreach (var label in labels) { @@ -60,7 +58,7 @@ public class MainToTitle : MonoBehaviour if (handle.Status == AsyncOperationStatus.Succeeded) { - downloadSize += handle.Result; + totalDownloadSize += handle.Result; } else { @@ -86,9 +84,9 @@ public class MainToTitle : MonoBehaviour } // 다운로드 크기 출력 - if (downloadSize > 0) + if (totalDownloadSize > 0) { - label_popup.text = $"다운로드 안내\n\n최신 패치 파일을 받아야 합니다.\n총 {FormatSize(downloadSize)}를 다운로드 합니다.\n\nWifi로 다운로드 하는 것을 권장합니다."; + label_popup.text = $"다운로드 안내\n\n최신 패치 파일을 받아야 합니다.\n총 {FormatSize(totalDownloadSize)}를 다운로드 합니다.\n\nWifi로 다운로드 하는 것을 권장합니다."; go_popup.SetActive(true); while (!startDownload) yield return null; // 팝업에서 OK 누를 때까지 대기 @@ -98,7 +96,6 @@ public class MainToTitle : MonoBehaviour // 다운로드 시작 foreach (var label in labels) { - // 다운로드 크기 계산 var handle = Addressables.GetDownloadSizeAsync(label); yield return handle; @@ -110,15 +107,16 @@ public class MainToTitle : MonoBehaviour while (!downHandle.IsDone) { - slider_download.value = (float)(completedDownloads + downHandle.PercentComplete) / totalLabels; - label_slider.text = $"{(slider_download.value * 100f).ToString("N2")}%"; + float progress = (float)currentDownloadedSize / totalDownloadSize; + slider_download.value = progress; + label_slider.text = $"{progress * 100f:N2}%"; yield return null; } if (downHandle.Status == AsyncOperationStatus.Succeeded) { - ++completedDownloads; - slider_download.value = (float)completedDownloads / totalLabels; + // 다운로드 완료 후 currentDownloadedSize에 추가 + currentDownloadedSize += handle.Result; } else { diff --git a/Assets/Script/Table/Mission/table_missionbase.cs b/Assets/Script/Table/Mission/table_missionbase.cs index 1adde5856..2e41be39b 100644 --- a/Assets/Script/Table/Mission/table_missionbase.cs +++ b/Assets/Script/Table/Mission/table_missionbase.cs @@ -93,15 +93,15 @@ public class table_missionbase : MonoBehaviour //json = $"{{\"table_abilityconfig\":{json}}}"; } } -#if UNITY_EDITOR protected void Set_lastjson2() { +#if UNITY_EDITOR // TODO 정인호 : 임의로 만든 json 파일 오류 처리 (정식에선 지워야함) int startIndex = json_last.IndexOf(","); // 첫 번째 객체 시작 int endIndex = json_last.IndexOf(",") + 1; // 첫 번째 객체 끝 json_last = json_last.Remove(startIndex, endIndex - startIndex); - } #endif + } protected virtual void Start() { LoadComplete = true; } public bool Get_LoadComplete() { return LoadComplete; } } \ No newline at end of file diff --git a/ProjectSettings/Packages/com.unity.services.core/Settings.json b/ProjectSettings/Packages/com.unity.services.core/Settings.json index e69de29bb..dc6a06b89 100644 --- a/ProjectSettings/Packages/com.unity.services.core/Settings.json +++ b/ProjectSettings/Packages/com.unity.services.core/Settings.json @@ -0,0 +1,4 @@ +{ + "EnvironmentName": "production", + "EnvironmentId": "aed3f247-7248-4a9e-a859-b52f7aaae216" +} \ No newline at end of file