SHA256
Remove Legacy Resource Loading
This commit is contained in:
1 file changed
+1
-41
+1
-41
@@ -85,46 +85,6 @@ internal class FFmpegDownloadUI : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TMP_FontAsset GetNanumSquareNeoBdFontAsset()
|
|
||||||
{
|
|
||||||
TMP_FontAsset? font = null;
|
|
||||||
if (ModAssets.FontBundle)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
font = ModAssets.FontBundle.LoadAsset<TMP_FontAsset>("NanumSquareNeoOTF-Bd SDF");
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// Loading failed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback processing
|
|
||||||
if (font == null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
font = RDString.fontData.fontTMP;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (font == null)
|
|
||||||
{
|
|
||||||
// ReSharper disable once Unity.UnknownResource
|
|
||||||
font = Resources.Load<TMP_FontAsset>("Fonts & Materials/LiberationSans SDF");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (font) return font;
|
|
||||||
var fonts = Resources.FindObjectsOfTypeAll<TMP_FontAsset>();
|
|
||||||
if (fonts.Length > 0) font = fonts[0];
|
|
||||||
|
|
||||||
return font!;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
// Set UI layer (5)
|
// Set UI layer (5)
|
||||||
@@ -159,7 +119,7 @@ internal class FFmpegDownloadUI : MonoBehaviour
|
|||||||
bgRect.offsetMin = Vector2.zero;
|
bgRect.offsetMin = Vector2.zero;
|
||||||
bgRect.offsetMax = Vector2.zero;
|
bgRect.offsetMax = Vector2.zero;
|
||||||
|
|
||||||
var font = GetNanumSquareNeoBdFontAsset();
|
var font = ModAssets.NanumSquareNeoNormal;
|
||||||
|
|
||||||
// 2. Create modal container
|
// 2. Create modal container
|
||||||
var modalContainerObj = new GameObject("ModalContainer");
|
var modalContainerObj = new GameObject("ModalContainer");
|
||||||
|
|||||||
Reference in new issue
Block a user