00 1.0.11更新
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9f7b7d280094f2e8f6aed8be7314b75
|
||||
timeCreated: 1744611639
|
||||
Reference in New Issue
Block a user