增加一个位置层级

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);

View File

@@ -6,7 +6,8 @@
"GUID:c5ecc461727906345a35491a0440694f",
"GUID:4d1926c9df5b052469a1c63448b7609a",
"GUID:e34a5702dd353724aa315fb8011f08c3",
"GUID:9343e3f36d5deca4880d49f48b3fa2b1"
"GUID:9343e3f36d5deca4880d49f48b3fa2b1",
"GUID:ec45849e30ba03e4dab386099d8c697b"
],
"includePlatforms": [
"Editor"