fix: 修复条件编译和资源系统变更导致的代码问题

This commit is contained in:
2026-03-12 17:46:51 +08:00
parent d44452d3ce
commit ee6fcc7aff
5 changed files with 19 additions and 17 deletions
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using AibisDream.Utility;
using UnityEngine;
using UnityEngine.Rendering;
@@ -489,11 +489,11 @@ namespace AibisDream
{
// 尝试获取 prefab 的 addressable key
var prefabSource = UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(_visualInstance);
if (prefabSource != null && ResourceKit.GetAssetAddressableKey(prefabSource, out string prefabPath))
{
Debug.Log($"SaveShape prefabPath: {prefabPath}");
_blockShapeData.prefabPath = prefabPath;
}
// if (prefabSource != null && EditorKit.GetAssetAddressableKey(prefabSource, out string prefabPath))
// {
// Debug.Log($"SaveShape prefabPath: {prefabPath}");
// _blockShapeData.prefabPath = prefabPath;
// }
}
BlockPuzzleKit.SaveBlockShapeData(_blockShapeData, _blockShapeData.shapeName);