어드레서블 다운로드 실시간 적용
This commit is contained in:
parent
815a9e7edd
commit
dbc0fcfa6c
Binary file not shown.
|
|
@ -461,6 +461,23 @@ public static class MyEditorUtil
|
|||
EditorApplication.update += UpdateAllObjects;
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Del_AddrResource")]
|
||||
static void Del_AddrResource()
|
||||
{
|
||||
bool result = EditorUtility.DisplayDialog(
|
||||
"경고!", // 제목
|
||||
"모든 어드레서블 데이터를 삭제하시겠습니까?", // 메시지
|
||||
"확인", // 확인 버튼
|
||||
"취소" // 취소 버튼
|
||||
);
|
||||
|
||||
if (result)
|
||||
{
|
||||
Caching.ClearCache();
|
||||
EditorUtility.DisplayDialog("알림", "삭제 완료", "확인");
|
||||
}
|
||||
}
|
||||
|
||||
//[MenuItem("Edit/Find All Particle", false, -103)]
|
||||
//public static void FindAllParticle()
|
||||
//{
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ messageinfo 엄청 느린 버그
|
|||
- 몬스터 패트롤 거리 조절
|
||||
- 점수와 골드 (기본 1점, 10골드만 주는 중(밸런스 필요))
|
||||
|
||||
어드레서블 다운로드 눈속임
|
||||
5그룹이라면 0~1 갈 때 0.2까지 쭉 올리고, 1~2 갈 때 0.4까지 쭉 올리고... 1까지 올리면 되지 않을까? 100%에서 다 되면 넘어가면 되지
|
||||
|
||||
타겟 락 시 카메라 타겟에게 고정
|
||||
로딩 UI
|
||||
|
||||
|
|
|
|||
|
|
@ -36,14 +36,12 @@ public class MainToTitle : MonoBehaviour
|
|||
{
|
||||
label_slider.text = "";
|
||||
long totalDownloadSize = 0;
|
||||
long currentDownloadedSize = 0; // 현재까지 다운로드된 용량
|
||||
int totalLabels = addr_Labels.Count;
|
||||
int totalLabels = 0;
|
||||
long currentDownloadedSize = 0; // 현재까지 다운로드한 용량
|
||||
|
||||
var labels = new List<string>();
|
||||
foreach (var labelRef in addr_Labels)
|
||||
{
|
||||
labels.Add(labelRef.labelString);
|
||||
}
|
||||
|
||||
// 다운로드 크기 계산 (실패 시 재시도)
|
||||
bool calcSuccess = false;
|
||||
|
|
@ -59,6 +57,7 @@ public class MainToTitle : MonoBehaviour
|
|||
if (handle.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
totalDownloadSize += handle.Result;
|
||||
++totalLabels;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -107,7 +106,10 @@ public class MainToTitle : MonoBehaviour
|
|||
|
||||
while (!downHandle.IsDone)
|
||||
{
|
||||
float progress = (float)currentDownloadedSize / totalDownloadSize;
|
||||
// 현재 파일의 다운로드 진행률 반영
|
||||
float labelProgress = downHandle.PercentComplete * handle.Result;
|
||||
float progress = (currentDownloadedSize + labelProgress) / totalDownloadSize;
|
||||
|
||||
slider_download.value = progress;
|
||||
label_slider.text = $"{progress * 100f:N2}%";
|
||||
yield return null;
|
||||
|
|
@ -115,7 +117,6 @@ public class MainToTitle : MonoBehaviour
|
|||
|
||||
if (downHandle.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
// 다운로드 완료 후 currentDownloadedSize에 추가
|
||||
currentDownloadedSize += handle.Result;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue