mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 12:47:12 +08:00
(client) feat:健康给予,路径优化,结算界面,商店界面 (#60)
Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com> Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/60
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
|
||||
// 确保你已经通过 Package Manager 或手动导入了 Newtonsoft.Json
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine.Tilemaps;
|
||||
using UnityEngine;
|
||||
// 确保你已经通过 Package Manager 或手动导入了 Newtonsoft.Json
|
||||
|
||||
public class RuleTileInspector : MonoBehaviour
|
||||
{
|
||||
@@ -19,6 +17,7 @@ public class RuleTileInspector : MonoBehaviour
|
||||
Debug.LogWarning("RuleTile 字段未分配,请拖拽一个 RuleTile 资产。", this);
|
||||
return;
|
||||
}
|
||||
|
||||
// 创建序列化设置
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
@@ -34,17 +33,15 @@ public class RuleTileInspector : MonoBehaviour
|
||||
try
|
||||
{
|
||||
// 序列化 ruleTile.m_TilingRules 列表
|
||||
string json = JsonConvert.SerializeObject(ruleTile.m_TilingRules, settings);
|
||||
var json = JsonConvert.SerializeObject(ruleTile.m_TilingRules, settings);
|
||||
Debug.Log("Serialized RuleTile Tiling Rules:\n" + json);
|
||||
}
|
||||
catch (JsonSerializationException ex)
|
||||
{
|
||||
Debug.LogError($"JSON Serialization Error: {ex.Message}\nPath: {ex.Path}\nStackTrace: {ex.StackTrace}");
|
||||
if (ex.InnerException != null)
|
||||
{
|
||||
Debug.LogError(
|
||||
$"Inner Exception: {ex.InnerException.Message}\nInner StackTrace: {ex.InnerException.StackTrace}");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user