报错修改

This commit is contained in:
2025-07-02 10:05:26 +08:00
parent c2bf9196b8
commit ec8b2f7e25
405 changed files with 16738 additions and 1883 deletions

View File

@@ -0,0 +1,51 @@
using Stary.Evo.Editor;
using UnityEditor;
using UnityEngine;
namespace Stary.Evo
{
[CustomEditor(typeof(HybridClREntrance))]
public class HybridClREntranceEditor : UnityEditor.Editor
{
/// <summary>
/// 序列化属性在OnEnable中获取
/// </summary>
[HideInInspector]
private SerializedProperty domain;
private string[] domainNames;
private void OnEnable()
{
domain = serializedObject.FindProperty("domain");
domainNames = CreatAssetWindow.GetCreatDomainAllName();
}
public override void OnInspectorGUI()
{
serializedObject.Update();
// 获取当前选中的索引
int selectedIndex = System.Array.IndexOf(domainNames, domain.stringValue);
if (selectedIndex < 0) selectedIndex = 0; // 默认选中第一个
// 绘制下拉选择框
selectedIndex = EditorGUILayout.Popup("Domain", selectedIndex, domainNames);
// 更新选择的域名
domain.stringValue = domainNames[selectedIndex];
serializedObject.ApplyModifiedProperties();
HybridClREntrance hybridClREntrance = target as HybridClREntrance;
if (GUILayout.Button("打开Domain"))
{
hybridClREntrance.OpenDomain();
}
if (GUILayout.Button("关闭Domain"))
{
hybridClREntrance.CloseDomain();
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d0996e24f28249ccb2bfb2a14e1358c1
timeCreated: 1744706140

View File

@@ -0,0 +1,20 @@
{
"name": "stary.main.editor",
"rootNamespace": "",
"references": [
"GUID:4492e37c9663479418f9522cc4796b57",
"GUID:d1a793c2b6959e04ea45b972eaa369c8",
"GUID:044184040b21c434b8aee6f2a3424c06"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5c6af7aee383dac46b510d588d1b015d
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: