donet format

This commit is contained in:
soarqin committed 2025-09-21 15:38:03 +08:00
1 parent 5f37b8b6d6
commit a25f74443d
32 files changed
+170 -155

No files matched your search

+4 -4
View File
@@ -36,13 +36,13 @@ public static class Util
tex.LoadImage(fileData);
return tex;
}
public static Sprite LoadSprite(string path)
{
var tex = LoadTexture(path);
return Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f));
}
public static Texture2D LoadEmbeddedTexture(string path, Assembly assembly = null)
{
var fileData = LoadEmbeddedResource(path, assembly);
@@ -50,12 +50,12 @@ public static class Util
tex.LoadImage(fileData);
return tex;
}
public static Sprite LoadEmbeddedSprite(string path, Assembly assembly = null)
{
var tex = LoadEmbeddedTexture(path, assembly);
return Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f));
}
public static string PluginFolder(Assembly assembly = null) => Path.GetDirectoryName((assembly == null ? Assembly.GetCallingAssembly() : assembly).Location);
}