디자인 적용

This commit is contained in:
logonkhi
2025-08-07 21:12:44 +09:00
parent 2e4718291e
commit 3297a5d1f3
139 changed files with 35760 additions and 736 deletions

View File

@@ -1,4 +1,5 @@
using System;
#nullable enable
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
@@ -523,5 +524,28 @@ namespace UVC.Extention
return -1;
}
/// <summary>
/// 지정된 리소스 경로에서 지정된 유형의 Unity 리소스를 로드합니다.
/// </summary>
/// <remarks>이 메서드는 Unity의 <see cref="UnityEngine.Resources.Load{T}(string)"/> 메서드를 사용하여 지정된 경로에서 리소스를 검색합니다. 리소스를 찾을 수 없거나 경로가 유효하지 않으면
/// 오류가 기록되고 <see langword="null"/>이 반환됩니다.</remarks>
/// <typeparam name="T">로드할 리소스의 유형입니다. <see cref="UnityEngine.Object"/>에서 파생되어야 합니다.</typeparam>
/// <param name="resourcePath">Unity 리소스 폴더 내 리소스 경로입니다. null이거나 비어 있을 수 없습니다.</param>
/// <returns> <typeparamref name="T"/> 유형의 로드된 리소스가 발견되면 해당 리소스를 반환합니다. 그렇지 않으면 <see langword="null"/>.</returns>
public static T? LoadResource<T>(this string resourcePath) where T : UnityEngine.Object
{
if (string.IsNullOrEmpty(resourcePath))
{
Debug.LogError("리소스 경로가 비어있습니다.");
return null;
}
T resource = Resources.Load<T>(resourcePath);
if (resource == null)
{
Debug.LogError($"리소스를 찾을 수 없습니다: {resourcePath}");
}
return resource;
}
}
}