- [Core] Fix bug with parsing Mesh [BH3]
- [GUI] Moved option to show `JSON` to `Dump` tab when `TypeTree` is not avaliable.
This commit is contained in:
@@ -18,7 +18,6 @@ using System.Windows.Forms;
|
||||
using static AssetStudio.GUI.Studio;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Mathematics;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Text.RegularExpressions;
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
@@ -870,12 +869,6 @@ namespace AssetStudio.GUI
|
||||
break;
|
||||
default:
|
||||
var str = assetItem.Asset.Dump();
|
||||
if (Properties.Settings.Default.displayAll || string.IsNullOrEmpty(str))
|
||||
{
|
||||
var settings = new JsonSerializerSettings();
|
||||
settings.Converters.Add(new StringEnumConverter());
|
||||
str = JsonConvert.SerializeObject(assetItem.Asset, Formatting.Indented, settings);
|
||||
}
|
||||
if (str != null)
|
||||
{
|
||||
textPreviewBox.Text = str;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
@@ -935,6 +937,12 @@ namespace AssetStudio.GUI
|
||||
var type = MonoBehaviourToTypeTree(m_MonoBehaviour);
|
||||
str = m_MonoBehaviour.Dump(type);
|
||||
}
|
||||
if (string.IsNullOrEmpty(str))
|
||||
{
|
||||
var settings = new JsonSerializerSettings();
|
||||
settings.Converters.Add(new StringEnumConverter());
|
||||
str = JsonConvert.SerializeObject(obj, Newtonsoft.Json.Formatting.Indented, settings);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user