Merge pull request #34 from ALEXTANGXIAO/TEngine_v_3.0.0

TEngine v 3.0.0 HybridCLR RunAble
This commit is contained in:
ALEXTANG
2023-04-25 14:13:05 +08:00
committed by GitHub
43 changed files with 66 additions and 31 deletions

View File

@@ -0,0 +1,18 @@
{
"name": "Procedure",
"rootNamespace": "",
"references": [
"GUID:aa06d4cc755c979489c256c1bcca1dfb",
"GUID:13ba8ce62aa80c74598530029cb2d649",
"GUID:6055be8ebefd69e48b49212b09b47b2f"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

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

View File

@@ -41,6 +41,21 @@ namespace GameMain
m_LoadAssemblyComplete = false;
m_HotfixAssemblys = new List<Assembly>();
//AOT Assembly加载原始metadata
if (SettingsUtils.HybridCLRCustomGlobalSettings.Enable)
{
#if !UNITY_EDITOR
m_LoadMetadataAssemblyComplete = false;
LoadMetadataForAOTAssembly();
#else
m_LoadMetadataAssemblyComplete = true;
#endif
}
else
{
m_LoadMetadataAssemblyComplete = true;
}
if (!NeedLoadDll || GameModule.Resource.playMode == EPlayMode.EditorSimulateMode)
{
m_MainLogicAssembly = GetMainLogicAssembly();
@@ -74,20 +89,6 @@ namespace GameMain
}
}
if (SettingsUtils.HybridCLRCustomGlobalSettings.Enable)
{
#if UNITY_EDITOR
m_LoadMetadataAssemblyComplete = false;
LoadMetadataForAOTAssembly();
#else
m_LoadMetadataAssemblyComplete = true;
#endif
}
else
{
m_LoadMetadataAssemblyComplete = true;
}
if (m_LoadAssetCount == 0)
{
m_LoadAssemblyComplete = true;

View File

@@ -17,6 +17,6 @@ MonoBehaviour:
BuildPackage: DefaultPackage
CompressOption: 2
OutputNameStyle: 1
CopyBuildinFileOption: 0
CopyBuildinFileOption: 1
CopyBuildinFileTags:
EncyptionClassName: FileOffsetEncryption

View File

@@ -41,10 +41,11 @@ MonoBehaviour:
m_Enable: 1
m_Gitee: 1
HotUpdateAssemblies:
- GameLogic.dll
- GameBase.dll
- GameLogic.dll
- GameProto.dll
- BattleCore.Runtime.dll
- Assembly-CSharp.dll
AOTMetaAssemblies:
- mscorlib.dll
- System.dll

View File

@@ -347,6 +347,7 @@ namespace TEngine
try
{
#if UNITY_EDITOR
TypeInfo typeInfo = typeof(AudioSettings).GetTypeInfo();
PropertyInfo propertyInfo = typeInfo.GetDeclaredProperty("unityAudioDisabled");
_bUnityAudioDisabled = (bool)propertyInfo.GetValue(null);
@@ -354,6 +355,7 @@ namespace TEngine
{
return;
}
#endif
}
catch (Exception e)
{

View File

@@ -10,7 +10,7 @@ namespace TEngine
/// </summary>
public class DefaultSettingHelper : SettingHelperBase
{
private const string SettingFileName = "GameFrameworkSetting.dat";
private const string SettingFileName = "TEngineSetting.dat";
private string m_FilePath = null;
private DefaultSetting m_Settings = null;

View File

@@ -30,7 +30,7 @@ public class HybridCLRCustomGlobalSettings
[Header("Auto sync with [HybridCLRGlobalSettings]")]
[Tooltip("You should modify the file form file path [Assets/CustomHybridCLR/Settings/HybridCLRGlobalSettings.asset]")]
public List<string> HotUpdateAssemblies = new List<string>() { "GameLogic.dll","GameBase.dll","GameProto.dll","BattleCore.Runtime.dll"};
public List<string> HotUpdateAssemblies = new List<string>() { "GameBase.dll","GameLogic.dll","GameProto.dll","BattleCore.Runtime.dll","Assembly-CSharp.dll"};
[Header("Need manual setting!")] public List<string> AOTMetaAssemblies= new List<string>() {"mscorlib.dll","System.dll","System.Core.dll" };

View File

@@ -3,7 +3,13 @@
### 日志记录编辑器下运行
![image](src/Editor-RunSuccessed.png)
### TODO - 安卓环境运行
---
### Win64位包运行
![image](src/Win64-RunSuccessed.png)
---
### 安卓真机运行
![image](src/Android-RunSuccessed.png)
### TODO - IOS环境运行

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

View File

@@ -1,6 +1,6 @@
{
"dependencies": {
"com.focus-creative-games.hybridclr_unity": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
"com.focus-creative-games.hybridclr_unity": "2.1.0",
"com.unity.2d.animation": "5.2.0",
"com.unity.2d.pixel-perfect": "4.0.1",
"com.unity.2d.psdimporter": "4.3.0",

View File

@@ -1,11 +1,11 @@
{
"dependencies": {
"com.focus-creative-games.hybridclr_unity": {
"version": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
"version": "2.1.0",
"depth": 0,
"source": "git",
"source": "registry",
"dependencies": {},
"hash": "bf6ae99dadfbc64e3a6f2dc7f63509a5b6b12621"
"url": "https://package.openupm.cn"
},
"com.unity.2d.animation": {
"version": "5.2.0",

View File

@@ -17,7 +17,6 @@ MonoBehaviour:
hybridclrRepoURL: https://gitee.com/focus-creative-games/hybridclr
il2cppPlusRepoURL: https://gitee.com/focus-creative-games/il2cpp_plus
hotUpdateAssemblyDefinitions:
- {fileID: 5897886265953266890, guid: aa06d4cc755c979489c256c1bcca1dfb, type: 3}
- {fileID: 5897886265953266890, guid: 08c3762f54316454ca6b6fbcb22b40e5, type: 3}
- {fileID: 5897886265953266890, guid: acd6baa97ba40d3478c29cd9c76ff9e3, type: 3}
- {fileID: 5897886265953266890, guid: a90b2d3377c5e4a4db95cc44fb82045e, type: 3}
@@ -29,7 +28,6 @@ MonoBehaviour:
externalHotUpdateAssembliyDirs: []
strippedAOTDllOutputRootDir: HybridCLRData/AssembliesPostIl2CppStrip
patchAOTAssemblies: []
collectAssetReferenceTypes: 0
outputLinkFile: HybridCLRData/Generated/link.xml
outputAOTGenericReferenceFile: HybridCLRData/Generated/AOTGenericReferences.cs
maxGenericReferenceIteration: 10

View File

@@ -99,7 +99,7 @@ PlayerSettings:
bakeCollisionMeshes: 0
forceSingleInstance: 0
useFlipModelSwapchain: 1
resizableWindow: 0
resizableWindow: 1
useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games
gpuSkinning: 0
@@ -110,7 +110,7 @@ PlayerSettings:
xboxEnableFitness: 0
visibleInBackground: 1
allowFullscreenSwitch: 1
fullscreenMode: 1
fullscreenMode: 3
xboxSpeechDB: 0
xboxEnableHeadOrientation: 0
xboxEnableGuest: 0
@@ -165,7 +165,7 @@ PlayerSettings:
androidMaxAspectRatio: 2.1
applicationIdentifier:
Android: com.dinstudio.tengine
Standalone: com.DefaultCompany.2DProject
Standalone: com.dinstudio.tengine
iPhone: com.dinstudio.tengine
buildNumber:
Standalone: 0
@@ -678,6 +678,7 @@ PlayerSettings:
platformArchitecture: {}
scriptingBackend:
Android: 1
Standalone: 1
il2cppCompilerConfiguration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild: {}
@@ -693,6 +694,7 @@ PlayerSettings:
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform:
Android: 3
Standalone: 3
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: 2D_BuiltInRenderer

View File

@@ -30,10 +30,10 @@ EditorUserSettings:
value: 22424703114646680e0b0227036c5e020204553f256522353e201a3dacf53a31f6fe
flags: 0
RecentlyUsedScenePath-8:
value: 22424703114646680e0b0227036c52111f19563f22213229
value: 224247031146467a2c3a092f006c4b151b07563f22213229
flags: 0
RecentlyUsedScenePath-9:
value: 224247031146467a2c3a092f006c4b151b07563f22213229
value: 22424703114646680e0b0227036c52111f19563f22213229
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650