Files
MSCO/Branding.cs
MrMahoandClaude Opus 5.5 461d94c5fc MSCO 2.9.0: standalone without MSCLoader (Unity Doorstop)
- Bootstrap: Doorstop entry point, loads Harmony/Newtonsoft from the MSCO folder, hooks
  PlayMakerArrayListProxy.Awake and starts MSCO in the main menu; skips the news screen
- No MSCLoader reference anymore; key bindings in PlayerPrefs, bind console command
- Harmony 1.2 and Newtonsoft.Json in lib/ (MIT notices); build copies to <game>\MSCO
- README/CHANGELOG updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:36:28 +02:00

51 lines
1.6 KiB
C#

using System.IO;
using System.Reflection;
using UnityEngine;
namespace MSCO
{
/// <summary>
/// MSCO-Logo (branding/logo-128.png, als Ressource in die DLL eingebettet):
/// Symbol im MSCO-Launcher (Hauptmenü) und in Overlays.
/// </summary>
public static class Branding
{
const string LogoResource = "MSCO.logo.png";
static byte[] logoPng;
static Texture2D logoTexture;
public static byte[] LogoPng
{
get
{
if (logoPng != null) return logoPng;
using (Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream(LogoResource))
{
if (s == null) return logoPng = new byte[0];
var data = new byte[s.Length];
int read = 0;
while (read < data.Length) read += s.Read(data, read, data.Length - read);
logoPng = data;
}
return logoPng;
}
}
/// <summary>Logo als Textur für OnGUI (nur im Hauptthread verwenden).</summary>
public static Texture2D LogoTexture
{
get
{
if (logoTexture != null) return logoTexture;
if (LogoPng.Length == 0) return null;
logoTexture = new Texture2D(2, 2, TextureFormat.ARGB32, false);
logoTexture.LoadImage(LogoPng);
logoTexture.filterMode = FilterMode.Bilinear;
logoTexture.hideFlags = HideFlags.HideAndDontSave;
return logoTexture;
}
}
}
}