【m】修改框架編輯器
This commit is contained in:
39
Assets/00.StaryEvo/Editor/ArtBuild/ArtSceneDataEditor.cs
Normal file
39
Assets/00.StaryEvo/Editor/ArtBuild/ArtSceneDataEditor.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector.Editor;
|
||||
using Stary.Evo;
|
||||
using Stary.Evo.Editor;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ArtSceneData))]
|
||||
public class ArtSceneDataEditor : OdinEditor
|
||||
{
|
||||
// /// <summary>
|
||||
// /// 序列化属性,在OnEnable中获取
|
||||
// /// </summary>
|
||||
// [HideInInspector] private SerializedProperty artScenes;
|
||||
private void OnEnable()
|
||||
{
|
||||
//artScenes = serializedObject.FindProperty("artScenes");
|
||||
ArtSceneData artSceneData = (ArtSceneData)target;
|
||||
List<ArtScene> artScenesList = artSceneData.artScenes;
|
||||
List<int> removeIndexList = new List<int>();
|
||||
for (int i = 0; i < artScenesList.Count; i++)
|
||||
{
|
||||
ArtScene artScene = artScenesList[i];
|
||||
if (artScene.sceneAsset==null)
|
||||
{
|
||||
removeIndexList.Add(i);
|
||||
}
|
||||
}
|
||||
for (int i = removeIndexList.Count - 1; i >= 0; i--)
|
||||
{
|
||||
int index = removeIndexList[i];
|
||||
artScenesList.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5762b2ce1b7e4184afd8785c147d42da
|
||||
timeCreated: 1761301851
|
||||
@@ -27,7 +27,7 @@ namespace Stary.Evo.Editor
|
||||
public static OdinEditorWindow window;
|
||||
private HotfixMainResDomain hotfixMainResDomain;
|
||||
|
||||
[MenuItem("Evo/Art/Art资源打包工具")]
|
||||
[MenuItem("Evo/Art/Art资源打包工具",false, 1)]
|
||||
static void ShowWindows()
|
||||
{
|
||||
if (CreatAssetWindow.GetCreatDomainAll().Count <= 0)
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
public class CreatArtAssetWindow : OdinEditorWindow
|
||||
{
|
||||
[MenuItem("Evo/Art/创建Art作用域")]
|
||||
[MenuItem("Evo/Art/创建Art作用域",false, 0)]
|
||||
static void Init()
|
||||
{
|
||||
// Get existing open window or if none, make a new one:
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
public static OdinEditorWindow window;
|
||||
|
||||
[MenuItem("Evo/Dev/Apk打包工具")]
|
||||
[MenuItem("Evo/Dev/Apk打包工具",false, 4)]
|
||||
static void ShowWindows()
|
||||
{
|
||||
window = (BuildApkWindow)EditorWindow.GetWindow(typeof(BuildApkWindow));
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Stary.Evo.Editor
|
||||
public static OdinEditorWindow window;
|
||||
private HotfixMainResDomain hotfixMainResDomain;
|
||||
|
||||
[MenuItem("Evo/Dev/资源打包工具")]
|
||||
[MenuItem("Evo/Dev/资源打包工具",false, 2)]
|
||||
static void ShowWindows()
|
||||
{
|
||||
#if NotUpdate
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
public class CreatAssetWindow : OdinEditorWindow
|
||||
{
|
||||
[MenuItem("Evo/Dev/创建Domain作用域")]
|
||||
[MenuItem("Evo/Dev/创建Domain作用域",false, 1)]
|
||||
static void Init()
|
||||
{
|
||||
// Get existing open window or if none, make a new one:
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
public class OneKeyBuildWindow : OdinEditorWindow
|
||||
{
|
||||
[MenuItem("Evo/Dev/(一键)打包工具")]
|
||||
[MenuItem("Evo/Dev/(一键)打包工具",false, 3)]
|
||||
static void Init()
|
||||
{
|
||||
#if NotUpdate
|
||||
|
||||
Reference in New Issue
Block a user