- [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:
Razmoth
2024-02-01 19:10:38 +04:00
parent 87e87cf0ab
commit 9ad9230946
3 changed files with 16 additions and 9 deletions

View File

@@ -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;
}