增加一个位置层级

This commit is contained in:
2025-04-15 17:06:01 +08:00
parent c03e963dcc
commit 779435c062
15 changed files with 15 additions and 275 deletions

View File

@@ -9,6 +9,7 @@ using HybridCLR.Editor.Settings;
using Sirenix.OdinInspector;
using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities;
using Stary.Evo.InformationSave;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
@@ -109,6 +110,15 @@ namespace Stary.Evo.Editor
gameObj.transform.position = Vector3.zero;
gameObj.transform.rotation = Quaternion.identity;
gameObj.name = domain;
//创建位置层级
GameObject transformInfo = new GameObject("TransformInfo");
transformInfo.transform.SetParent(gameObj.transform);
transformInfo.transform.position = Vector3.zero;
transformInfo.transform.rotation = Quaternion.identity;
transformInfo.AddComponent<LocalTransformInfo>();
Directory.CreateDirectory($"{resPath}/Prefabs");
string rootPfbFilePath = $"Assets/Domain/{domain}/AddressableRes/Prefabs/{domain}.prefab";
var localPath = AssetDatabase.GenerateUniqueAssetPath(rootPfbFilePath);