2025-07-02 16:28:08 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Stary.Evo;
|
|
|
|
|
|
using Stary.Evo.Editor;
|
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
[CustomEditor(typeof(HotfixMainResDomain))]
|
|
|
|
|
|
public class HotfixMainResDomainEditor : UnityEditor.Editor
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 序列化属性,在OnEnable中获取
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HideInInspector]
|
|
|
|
|
|
private SerializedProperty projectInfo;
|
|
|
|
|
|
|
|
|
|
|
|
private void OnEnable()
|
|
|
|
|
|
{
|
|
|
|
|
|
projectInfo = serializedObject.FindProperty("projectInfo");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void OnInspectorGUI()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnInspectorGUI();
|
|
|
|
|
|
HotfixMainResDomain hotfixMainResDomain = (HotfixMainResDomain)target;
|
|
|
|
|
|
hotfixMainResDomain.projectInfo.projectPackageName = $"com.xosmo.{hotfixMainResDomain.projectInfo.projectCode}";
|
2025-07-02 18:14:15 +08:00
|
|
|
|
|
|
|
|
|
|
if (hotfixMainResDomain.projectInfo.loadingScene == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
Debug.LogError("HotfixMainResDomain 资源中loadingScene索引不存在,请检查!");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
// 获取loadingScene的Assets相对路径
|
|
|
|
|
|
hotfixMainResDomain.projectInfo.loadingScenePath = AssetDatabase.GetAssetPath(hotfixMainResDomain.projectInfo.loadingScene);
|
2025-07-02 16:28:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|