mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 09:58:02 +08:00
Update UnityExplorer from another fork (#33)
Co-authored-by: yukieiji <[email protected]> Co-authored-by: 1A3 <[email protected]>
This commit is contained in:
33 files changed
+552
-374
No files matched your search
@@ -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(),
|
||||
|
||||
|
||||
Reference in new issue
Block a user