mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
TEngine设置面板增加从Hybrid同步AOT与热更程序集的按钮
TEngine设置面板增加从Hybrid同步AOT与热更程序集的按钮
This commit is contained in:
15
Assets/TEngine/Editor/GameSettings/SynAssemblysContent.cs
Normal file
15
Assets/TEngine/Editor/GameSettings/SynAssemblysContent.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public static class SyncAssemblyContent
|
||||
{
|
||||
public static void RefreshAssembly()
|
||||
{
|
||||
SettingsUtils.SetHybridCLRHotUpdateAssemblies(HybridCLR.Editor.SettingsUtil.HotUpdateAssemblyFilesIncludePreserved);
|
||||
SettingsUtils.SetHybridCLRAOTMetaAssemblies(HybridCLR.Editor.SettingsUtil.AOTAssemblyNames);
|
||||
SettingsUtils.HybridCLRCustomGlobalSettings.Enable = HybridCLR.Editor.SettingsUtil.Enable;
|
||||
AssetDatabase.Refresh();
|
||||
AssetDatabase.SaveAssets();
|
||||
Debug.Log("同步AOT和HotUpdate程序集 HybridCLR到TEngineSettings成功。");
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04407344026702f4ebd61f63c8a35c69
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -2,6 +2,7 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine.UIElements;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TEngineSettingsProvider : SettingsProvider
|
||||
{
|
||||
@@ -30,6 +31,14 @@ public class TEngineSettingsProvider : SettingsProvider
|
||||
base.OnGUI(searchContext);
|
||||
using var changeCheckScope = new EditorGUI.ChangeCheckScope();
|
||||
EditorGUILayout.PropertyField(m_CustomSettings.FindProperty("m_FrameworkGlobalSettings"));
|
||||
|
||||
if ( GUILayout.Button( "Refresh HotUpdateAssemblies" ) )
|
||||
{
|
||||
SyncAssemblyContent.RefreshAssembly();
|
||||
m_CustomSettings.ApplyModifiedPropertiesWithoutUndo();
|
||||
m_CustomSettings = null;
|
||||
m_CustomSettings = GetSerializedSettings();
|
||||
}
|
||||
EditorGUILayout.PropertyField(m_CustomSettings.FindProperty("m_BybridCLRCustomGlobalSettings"));
|
||||
EditorGUILayout.Space(20);
|
||||
if (!changeCheckScope.changed) return;
|
||||
@@ -51,7 +60,7 @@ public class TEngineSettingsProvider : SettingsProvider
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogError($"Open GameFramework Settings error,Please Create Game Framework/GameFrameworkSettings.assets File in Path GameMain/Resources/Settings");
|
||||
UnityEngine.Debug.LogError($"Open TEngine Settings error,Please Create TEngine TEngineGlobalSettings.assets File in Path TEngine/ResRaw/Resources/");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@@ -208,7 +208,7 @@ public static class SettingsUtils
|
||||
{
|
||||
return FrameworkGlobalSettings.ScriptGenerateRule;
|
||||
}
|
||||
|
||||
|
||||
public static string GetUINameSpace()
|
||||
{
|
||||
return FrameworkGlobalSettings.NameSpace;
|
||||
|
Reference in New Issue
Block a user