Update UnityExplorer from another fork (#33)

Co-authored-by: yukieiji <[email protected]>
Co-authored-by: 1A3 <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-02-05 22:28:41 -03:00
1 parent d8151bd99d
commit 89ee7747e5
33 files changed
+552 -374

No files matched your search

+3 -2
View File
@@ -73,7 +73,8 @@ namespace UnityExplorer.UI.Panels
File.Delete(files[i]);
}
File.WriteAllLines(CurrentStreamPath, Logs.Select(it => it.message).ToArray());
if (ConfigManager.Log_To_Disk.Value)
File.WriteAllLines(CurrentStreamPath, Logs.Select(it => it.message).ToArray());
}
// Logging
@@ -82,7 +83,7 @@ namespace UnityExplorer.UI.Panels
{
Logs.Add(new LogInfo(message, type));
if (CurrentStreamPath != null)
if (CurrentStreamPath != null && ConfigManager.Log_To_Disk.Value)
File.AppendAllText(CurrentStreamPath, '\n' + message);
if (logScrollPool != null)
@@ -49,7 +49,7 @@ namespace UnityExplorer.UI.Widgets
{
if (material.GetTexture(property) is Texture texture)
{
if (texture.TryCast<Texture2D>() is null && texture.TryCast<Cubemap>() is null)
if (texture.TryCast<Texture2D>() == null && texture.TryCast<Cubemap>() == null)
continue;
textures.Add(property, texture);
@@ -28,7 +28,7 @@ namespace UnityExplorer.UI.Widgets
{
Texture2D or Cubemap => Pool<Texture2DWidget>.Borrow(),
Sprite s when s.texture => Pool<Texture2DWidget>.Borrow(),
Image i when i.sprite?.texture => Pool<Texture2DWidget>.Borrow(),
Image i when i.sprite && i.sprite.texture => Pool<Texture2DWidget>.Borrow(),
Material when MaterialWidget.MaterialWidgetSupported => Pool<MaterialWidget>.Borrow(),