diff --git a/MiraAPI/Colors/PaletteManager.cs b/MiraAPI/Colors/PaletteManager.cs
index a12cfac4..c7883531 100644
--- a/MiraAPI/Colors/PaletteManager.cs
+++ b/MiraAPI/Colors/PaletteManager.cs
@@ -18,12 +18,15 @@ public static class PaletteManager
internal static void RegisterAllColors()
{
- var colors = CustomColors.Select(x => x.MainColor);
- var shadowColors = CustomColors.Select(x => x.ShadowColor);
- var stringNames = CustomColors.Select(x => x.Name);
+ var colors = CustomColors.Select(x => x.MainColor).ToArray();
+ var shadowColors = CustomColors.Select(x => x.ShadowColor).ToArray();
+ var stringNames = CustomColors.Select(x => x.Name).ToArray();
- Palette.PlayerColors = Palette.PlayerColors.ToArray().AddRangeToArray(colors.ToArray());
- Palette.ShadowColors = Palette.ShadowColors.ToArray().AddRangeToArray(shadowColors.ToArray());
- Palette.ColorNames = Palette.ColorNames.ToArray().AddRangeToArray(stringNames.ToArray());
+ Palette.PlayerColors = Palette.PlayerColors.ToArray().AddRangeToArray(colors);
+ Palette.ShadowColors = Palette.ShadowColors.ToArray().AddRangeToArray(shadowColors);
+ Palette.ColorNames = Palette.ColorNames.ToArray().AddRangeToArray(stringNames);
+
+ Palette.TextColors = Palette.TextColors.ToArray().AddRangeToArray(colors);
+ Palette.TextOutlineColors = Palette.TextOutlineColors.ToArray().AddRangeToArray(shadowColors);
}
}
diff --git a/MiraAPI/Utilities/Assets/SpriteTools.cs b/MiraAPI/Utilities/Assets/SpriteTools.cs
index 3ed203c7..d086a9ef 100644
--- a/MiraAPI/Utilities/Assets/SpriteTools.cs
+++ b/MiraAPI/Utilities/Assets/SpriteTools.cs
@@ -13,10 +13,23 @@ namespace MiraAPI.Utilities.Assets;
///
public static class SpriteTools
{
+ ///
+ /// Delegate for LoadImage.
+ ///
public delegate bool DLoadImage(IntPtr tex, IntPtr data, bool markNonReadable);
- public static DLoadImage ICallLoadImage;
+ ///
+ /// The ICall for LoadImage.
+ ///
+ public static DLoadImage? ICallLoadImage;
+ ///
+ /// Load an image into a texture.
+ ///
+ /// The texture.
+ /// Byte data of image.
+ /// Mark nonreadable.
+ /// True if succeeded.
public static bool LoadImage(Texture2D tex, byte[] data, bool markNonReadable)
{
ICallLoadImage ??= IL2CPP.ResolveICall("UnityEngine.ImageConversion::LoadImage");
@@ -48,4 +61,4 @@ public static class SpriteTools
return Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f));
}
-}
\ No newline at end of file
+}