【m】框架大更新

This commit is contained in:
2025-10-31 11:18:23 +08:00
parent ae6e7c804b
commit 8e1d52ddbf
1883 changed files with 213934 additions and 640 deletions

View File

@@ -3,30 +3,26 @@ using Sirenix.OdinInspector;
using UnityEditor;
using UnityEngine;
namespace Stary.Evo.Editor
namespace Stary.Evo
{
[CreateAssetMenu(fileName = "ArtSceneData", menuName = "Evo/ArtSceneData")]
public class ArtSceneData : ScriptableObject
{
[ListDrawerSettings(DraggableItems = false, ShowFoldout = false, ShowPaging = false, ShowItemCount = false)]
public List<ArtScene> artScenes = new List<ArtScene>();
}
[System.Serializable]
public class ArtScene
{
[LabelText("场景名称")]
public string sceneName;
#if UNITY_EDITOR
[LabelText("场景实例")][OnValueChanged("LoadScenePath")]
[LabelText("场景名称")] public string sceneName;
[LabelText("场景实例")] [OnValueChanged("LoadScenePath")]
public SceneAsset sceneAsset;
#endif
[LabelText("场景路径")][ReadOnly]
public string scenePath;
[LabelText("场景标识符")][ReadOnly]
public string sceneIdentifier;
[LabelText("场景路径")] [ReadOnly] public string scenePath;
[LabelText("场景标识符")] [ReadOnly] public string sceneIdentifier;
#if UNITY_EDITOR
public void LoadScenePath()
{
if (sceneAsset == null)
@@ -34,8 +30,13 @@ namespace Stary.Evo.Editor
Debug.LogError($"ArtScene {sceneName} 资源不存在,请检查!");
return;
}
scenePath = AssetDatabase.GetAssetPath(sceneAsset);
sceneIdentifier= $"Scenes_{sceneAsset.name}" ;
sceneIdentifier = $"Scenes_{sceneAsset.name}";
AssetDatabase.SaveAssets();
}
#endif
}
}

View File

@@ -27,9 +27,7 @@ namespace Stary.Evo
[Sirenix.OdinInspector.ReadOnly] public string className;
public LoadResType loadResType;
[Sirenix.OdinInspector.ReadOnly] [ShowIf("loadResType", LoadResType.Prefab)]
/// <summary>
@@ -38,18 +36,20 @@ namespace Stary.Evo
public string mainPrefab;
#if UNITY_EDITOR
[ShowIf("loadResType", LoadResType.Scene)][OnValueChanged("LoadScenePath")]
[ShowIf("loadResType", LoadResType.Scene)] [OnValueChanged("LoadScenePath")]
public SceneAsset sceneAsset;
#endif
[ShowIf("loadResType", LoadResType.Scene)][ReadOnly]
public string scenePath;
[ShowIf("loadResType", LoadResType.Scene)][ReadOnly]
public string sceneIdentifier;
[ShowIf("loadResType", LoadResType.Scene)]
[ShowIf("loadResType", LoadResType.Scene)]
public LoadSceneMode loadSceneMode;
[ShowIf("loadResType", LoadResType.Scene)] [ReadOnly]
public string scenePath;
[ShowIf("loadResType", LoadResType.Scene)] [ReadOnly]
public string sceneIdentifier;
#if UNITY_EDITOR
public void LoadScenePath()
{
if (sceneAsset == null)
@@ -57,14 +57,15 @@ namespace Stary.Evo
Debug.LogError($"Scene {scenePath} 资源不存在,请检查!");
return;
}
scenePath = AssetDatabase.GetAssetPath(sceneAsset);
sceneIdentifier= $"Scenes_{sceneAsset.name}" ;
sceneIdentifier = $"Scenes_{sceneAsset.name}";
}
#endif
public enum LoadResType
{
Prefab,
Scene
}
}
}