00 1.0.11更新

This commit is contained in:
2025-04-14 14:40:32 +08:00
parent c0b38b6524
commit 902c7b1c5f
5 changed files with 61 additions and 16 deletions

View File

@@ -0,0 +1,40 @@
using System.Collections.Generic;
using Stary.Evo.Editor;
using UnityEditor;
using UnityEngine;
namespace Stary.Evo
{
[CustomEditor(typeof(MainDomainAll))]
public class MainDomainAllEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
if (GUILayout.Button("生成点位集合数据"))
{
var domainAll = CreatAssetWindow.GetCreatDomainAll();
List<VideoDomainEntity> videoDomainEntities = new List<VideoDomainEntity>();
for (int i = 0; i < domainAll.Count; i++)
{
if (domainAll[i].DomainName != "Main")
videoDomainEntities.Add(new VideoDomainEntity()
{
domainName = domainAll[i].DomainName,
});
}
// string configPath = $"Assets/Main/Resources/MainDomainAll.asset";
// MainDomainAll targetComponent =
// AssetDatabase.LoadAssetAtPath<MainDomainAll>(configPath);
var targetComponent = target as MainDomainAll;
if (targetComponent != null)
{
targetComponent.domainAll = videoDomainEntities.ToArray();
}
EditorUtility.SetDirty(targetComponent);
AssetDatabase.SaveAssets();
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a9f7b7d280094f2e8f6aed8be7314b75
timeCreated: 1744611639