diff --git a/.gitignore b/.gitignore index ba97dbfc..69f5fa73 100644 --- a/.gitignore +++ b/.gitignore @@ -87,4 +87,9 @@ TEngineHotUpdate/obj [Aa]ssets/BuildConfig.meta [Aa]ssets/StreamingAssets/ -[Aa]ssets/StreamingAssets.meta \ No newline at end of file +[Aa]ssets/StreamingAssets.meta +Assets/HybridCLRBuildCache/AssetBundleOutput.meta +Assets/HybridCLRBuildCache/AssetBundleOutput/StandaloneWindows.meta +Assets/HybridCLRBuildCache.meta +Assets/HybridCLRBuildCache/AssetBundleSourceData.meta +Assets/HybridCLRBuildCache/AssetBundleSourceData/StandaloneWindows.meta diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureLaunch.cs b/Assets/GameMain/Scripts/GameProcedure/ProcedureLaunch.cs deleted file mode 100644 index e3783381..00000000 --- a/Assets/GameMain/Scripts/GameProcedure/ProcedureLaunch.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace TEngine.Runtime -{ - /// - /// 流程加载器 - 开始起点 - /// - public class ProcedureLaunch : ProcedureBase - { - - protected override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) - { - base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds); - ChangeState(procedureOwner); - } - } -} \ No newline at end of file diff --git a/Assets/HotFix/GameHotfixEntry.cs b/Assets/HotFix/GameHotfixEntry.cs index b437a002..65042c8a 100644 --- a/Assets/HotFix/GameHotfixEntry.cs +++ b/Assets/HotFix/GameHotfixEntry.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using TEngine.Runtime; +using UnityEngine; namespace HotFix { @@ -8,12 +9,16 @@ namespace HotFix { public static void Start() { - Log.Debug("HotFix.GameHotfixEntry"); + Log.Fatal("HotFix.GameHotfixEntry"); + + Log.Fatal("=======看到此条日志代表你成功运行了示例项目的热更新代码======="); + MonoUtility.AddUpdateListener(Update); + TResources.Load("Test/Cube.prefab"); } - void Update() + private static void Update() { - + } } } diff --git a/Assets/HotFix/HotFix.asmdef b/Assets/HotFix/HotFix.asmdef index 1a233655..de1fc55a 100644 --- a/Assets/HotFix/HotFix.asmdef +++ b/Assets/HotFix/HotFix.asmdef @@ -1,7 +1,9 @@ { "name": "HotFix", + "rootNamespace": "", "references": [ - "GUID:f4ecd6f7bd8993043b6cec60dd0cf2b2" + "GUID:f4ecd6f7bd8993043b6cec60dd0cf2b2", + "GUID:13ba8ce62aa80c74598530029cb2d649" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/GameMain.meta b/Assets/HybridCLRBuildCache/AssetBundleOutput/StandaloneWindows64.meta similarity index 77% rename from Assets/GameMain.meta rename to Assets/HybridCLRBuildCache/AssetBundleOutput/StandaloneWindows64.meta index 564afe8c..ad433c81 100644 --- a/Assets/GameMain.meta +++ b/Assets/HybridCLRBuildCache/AssetBundleOutput/StandaloneWindows64.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2e3556191f5868b45bdae236bf486400 +guid: c9e0380f60537b945a1ccc67178ee9db folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/GameMain/Scripts.meta b/Assets/HybridCLRBuildCache/AssetBundleSourceData/StandaloneWindows64.meta similarity index 77% rename from Assets/GameMain/Scripts.meta rename to Assets/HybridCLRBuildCache/AssetBundleSourceData/StandaloneWindows64.meta index 8e7aa3e6..24160ce5 100644 --- a/Assets/GameMain/Scripts.meta +++ b/Assets/HybridCLRBuildCache/AssetBundleSourceData/StandaloneWindows64.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 87b670c48f0b7184bbcdbab5636fecce +guid: cb299b00a09f18a41bdefef8358a1958 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scenes/DemoScene.unity b/Assets/Scenes/main.unity similarity index 78% rename from Assets/Scenes/DemoScene.unity rename to Assets/Scenes/main.unity index b6a2d8de..c519a781 100644 --- a/Assets/Scenes/DemoScene.unity +++ b/Assets/Scenes/main.unity @@ -43,7 +43,7 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 @@ -98,7 +98,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_LightingSettings: {fileID: 791812208} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -118,6 +118,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -204,49 +206,67 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1510960682 -GameObject: +--- !u!850595691 &791812208 +LightingSettings: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1510960683} - - component: {fileID: 1510960684} - m_Layer: 0 - m_Name: DemoMain - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1510960683 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1510960682} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1510960684 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1510960682} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c07e500655d56ee4eb74a247e284c1d6, type: 3} - m_Name: - m_EditorClassIdentifier: + m_Name: Settings.lighting + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 --- !u!1001 &1556424202 PrefabInstance: m_ObjectHideFlags: 0 @@ -262,11 +282,21 @@ PrefabInstance: propertyPath: m_EntityGroupHelperTypeName value: TEngine.Runtime.Entity.DefaultEntityGroupHelper objectReference: {fileID: 0} + - target: {fileID: 3463045026010536330, guid: 161ff7c8132079c4a95e2e4e70ddd41b, + type: 3} + propertyPath: ResourceMode + value: 2 + objectReference: {fileID: 0} - target: {fileID: 3463045026180535776, guid: 161ff7c8132079c4a95e2e4e70ddd41b, type: 3} propertyPath: m_Name value: TEngine objectReference: {fileID: 0} + - target: {fileID: 3463045026180535779, guid: 161ff7c8132079c4a95e2e4e70ddd41b, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} - target: {fileID: 3463045026180535779, guid: 161ff7c8132079c4a95e2e4e70ddd41b, type: 3} propertyPath: m_LocalPosition.x @@ -282,6 +312,11 @@ PrefabInstance: propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 3463045026180535779, guid: 161ff7c8132079c4a95e2e4e70ddd41b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} - target: {fileID: 3463045026180535779, guid: 161ff7c8132079c4a95e2e4e70ddd41b, type: 3} propertyPath: m_LocalRotation.x @@ -297,16 +332,6 @@ PrefabInstance: propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 3463045026180535779, guid: 161ff7c8132079c4a95e2e4e70ddd41b, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3463045026180535779, guid: 161ff7c8132079c4a95e2e4e70ddd41b, - type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - target: {fileID: 3463045026180535779, guid: 161ff7c8132079c4a95e2e4e70ddd41b, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -322,5 +347,15 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 3463045026377943191, guid: 161ff7c8132079c4a95e2e4e70ddd41b, + type: 3} + propertyPath: m_EntranceProcedureTypeName + value: TEngine.Runtime.ProcedureLaunch + objectReference: {fileID: 0} + - target: {fileID: 3463045026377943191, guid: 161ff7c8132079c4a95e2e4e70ddd41b, + type: 3} + propertyPath: m_AvailableProcedureTypeNames.Array.size + value: 8 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 161ff7c8132079c4a95e2e4e70ddd41b, type: 3} diff --git a/Assets/Scenes/DemoScene.unity.meta b/Assets/Scenes/main.unity.meta similarity index 74% rename from Assets/Scenes/DemoScene.unity.meta rename to Assets/Scenes/main.unity.meta index c1e3c88e..a441676b 100644 --- a/Assets/Scenes/DemoScene.unity.meta +++ b/Assets/Scenes/main.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2cda990e2423bbf4892e6590ba056729 +guid: 07f693cf49a00634fbc050b96052bebd DefaultImporter: externalObjects: {} userData: diff --git a/Assets/TEngine/Scripts/Editor/AssetBundleBuild/AssetbundleBuilder.cs b/Assets/TEngine/Scripts/Editor/AssetBundleBuild/AssetbundleBuilder.cs index 4c8670b0..5f9d39af 100644 --- a/Assets/TEngine/Scripts/Editor/AssetBundleBuild/AssetbundleBuilder.cs +++ b/Assets/TEngine/Scripts/Editor/AssetBundleBuild/AssetbundleBuilder.cs @@ -72,7 +72,7 @@ namespace TEngineCore.Editor /// /// 文件过滤 /// - private string[] fileExcludeFilter = new[] { ".cs", ".meta", ".dll", ".DS_Store", ".unity" }; + private string[] fileExcludeFilter = new[] { ".cs", ".meta", ".dll", ".DS_Store"/*, ".unity" */}; /// /// 资源环信息初始化 diff --git a/Assets/TEngine/Scripts/Editor/AssetBundleBuild/Editor/BuilderEditor.cs b/Assets/TEngine/Scripts/Editor/AssetBundleBuild/Editor/BuilderEditor.cs index 236c57bd..40d8ca4c 100644 --- a/Assets/TEngine/Scripts/Editor/AssetBundleBuild/Editor/BuilderEditor.cs +++ b/Assets/TEngine/Scripts/Editor/AssetBundleBuild/Editor/BuilderEditor.cs @@ -1,11 +1,13 @@ using System; using System.IO; using TEngine; +using TEngine.Editor; using TEngine.Runtime; using UnityEditor; using UnityEngine; using UnityEngine.Serialization; using Object = UnityEngine.Object; +using Type = System.Type; namespace TEngineCore.Editor { @@ -222,7 +224,7 @@ namespace TEngineCore.Editor #endregion #region 打包按钮 - [BuilderEditor("Copy And Encrpt DLL", ContentType.Button, ",CB:CopyDLL,FlowA:disPlayType:1")] + [BuilderEditor("Generate DLL", ContentType.Button, ",CB:GenerateDLL,FlowA:disPlayType:1")] private int copydll; [BuilderEditor("Build AssetBundle", ContentType.Button, ",CB:BuildAssetBundle,FlowA:disPlayType:1")] @@ -649,6 +651,24 @@ namespace TEngineCore.Editor } } + private void GenerateDLL(string args) + { + if (EditorApplication.isCompiling) + { + EditorUtility.DisplayDialog("Build AssetBundle", "请等待编译完成", "ok"); + return; + } + + ApplyArgs(""); + + BuildAssetsCommand.BuildAndCopyABAOTHotUpdateDlls(); + + TLogger.LogInfoSuccessd("1.生成DLL的bytes成功"); + + AssetDatabase.Refresh(); + + GUIUtility.ExitGUI(); + } private void CopyDLL(string args) { diff --git a/Assets/TEngine/Scripts/Editor/HybridCLR.meta b/Assets/TEngine/Scripts/Editor/HybridCLR.meta new file mode 100644 index 00000000..88714cb5 --- /dev/null +++ b/Assets/TEngine/Scripts/Editor/HybridCLR.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 027adf2a5b5352a498cfa2ad92dda120 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TEngine/Scripts/Editor/HybridCLR/BuildAssetsCommand.cs b/Assets/TEngine/Scripts/Editor/HybridCLR/BuildAssetsCommand.cs new file mode 100644 index 00000000..cccaf22c --- /dev/null +++ b/Assets/TEngine/Scripts/Editor/HybridCLR/BuildAssetsCommand.cs @@ -0,0 +1,147 @@ +using HybridCLR.Editor.Commands; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using HybridCLR.Editor; +using TEngine.Runtime; +using UnityEditor; +using UnityEngine; + +namespace TEngine.Editor +{ + public static class BuildAssetsCommand + { + public static string HybridCLRBuildCacheDir => Application.dataPath + "/HybridCLRBuildCache"; + + public static string AssetBundleOutputDir => $"{HybridCLRBuildCacheDir}/AssetBundleOutput"; + + public static string AssetBundleSourceDataTempDir => $"{HybridCLRBuildCacheDir}/AssetBundleSourceData"; + + + public static string GetAssetBundleOutputDirByTarget(BuildTarget target) + { + return $"{AssetBundleOutputDir}/{target}"; + } + + public static string GetAssetBundleTempDirByTarget(BuildTarget target) + { + return $"{AssetBundleSourceDataTempDir}/{target}"; + } + + public static string ToRelativeAssetPath(string s) + { + return s.Substring(s.IndexOf("Assets/")); + } + + /// + /// 将HotFix.dll和HotUpdatePrefab.prefab打入common包. + /// 将HotUpdateScene.unity打入scene包. + /// + /// + /// + /// + private static void BuildAssetBundles(string tempDir, string outputDir, BuildTarget target) + { + Directory.CreateDirectory(tempDir); + Directory.CreateDirectory(outputDir); + + List abs = new List(); + + { + var prefabAssets = new List(); + string testPrefab = $"{Application.dataPath}/Prefabs/HotUpdatePrefab.prefab"; + prefabAssets.Add(testPrefab); + AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); + abs.Add(new AssetBundleBuild + { + assetBundleName = "prefabs", + assetNames = prefabAssets.Select(s => ToRelativeAssetPath(s)).ToArray(), + }); + } + + BuildPipeline.BuildAssetBundles(outputDir, abs.ToArray(), BuildAssetBundleOptions.None, target); + AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); + } + + public static void BuildAssetBundleByTarget(BuildTarget target) + { + BuildAssetBundles(GetAssetBundleTempDirByTarget(target), GetAssetBundleOutputDirByTarget(target), target); + } + + [MenuItem("HybridCLR/Build/BuildAssetsAndCopyToStreamingAssets")] + public static void BuildAndCopyABAOTHotUpdateDlls() + { + BuildTarget target = EditorUserBuildSettings.activeBuildTarget; + BuildAssetBundleByTarget(target); + CompileDllCommand.CompileDll(target); + CopyABAOTHotUpdateDlls(target); + } + + public static void CopyABAOTHotUpdateDlls(BuildTarget target) + { + CopyAssetBundlesToStreamingAssets(target); + CopyAOTAssembliesToStreamingAssets(); + CopyHotUpdateAssembliesToStreamingAssets(); + } + + + //[MenuItem("HybridCLR/Build/BuildAssetbundle")] + public static void BuildSceneAssetBundleActiveBuildTargetExcludeAOT() + { + BuildAssetBundleByTarget(EditorUserBuildSettings.activeBuildTarget); + } + + public static void CopyAOTAssembliesToStreamingAssets() + { + var target = EditorUserBuildSettings.activeBuildTarget; + string aotAssembliesSrcDir = SettingsUtil.GetAssembliesPostIl2CppStripDir(target); + string aotAssembliesDstDir = Application.streamingAssetsPath+"/../TResources/DLL/"; + + foreach (var dll in ProcedureCodeInit.AOTMetaAssemblyNames) + { + string srcDllPath = $"{aotAssembliesSrcDir}/{dll}"; + if (!File.Exists(srcDllPath)) + { + Debug.LogError($"ab中添加AOT补充元数据dll:{srcDllPath} 时发生错误,文件不存在。裁剪后的AOT dll在BuildPlayer时才能生成,因此需要你先构建一次游戏App后再打包。"); + continue; + } + string dllBytesPath = $"{aotAssembliesDstDir}/{dll}.bytes"; + File.Copy(srcDllPath, dllBytesPath, true); + Debug.Log($"[CopyAOTAssembliesToStreamingAssets] copy AOT dll {srcDllPath} -> {dllBytesPath}"); + } + } + + public static void CopyHotUpdateAssembliesToStreamingAssets() + { + var target = EditorUserBuildSettings.activeBuildTarget; + + string hotfixDllSrcDir = SettingsUtil.GetHotUpdateDllsOutputDirByTarget(target); + string hotfixAssembliesDstDir = Application.streamingAssetsPath+"/../TResources/DLL/"; + foreach (var dll in SettingsUtil.HotUpdateAssemblyFilesExcludePreserved) + { + string dllPath = $"{hotfixDllSrcDir}/{dll}"; + string dllBytesPath = $"{hotfixAssembliesDstDir}/{dll}.bytes"; + File.Copy(dllPath, dllBytesPath, true); + Debug.Log($"[CopyHotUpdateAssembliesToStreamingAssets] copy hotfix dll {dllPath} -> {dllBytesPath}"); + } + } + + public static void CopyAssetBundlesToStreamingAssets(BuildTarget target) + { + string streamingAssetPathDst = Application.streamingAssetsPath+"/../TResources/DLL/"; + Directory.CreateDirectory(streamingAssetPathDst); + string outputDir = GetAssetBundleOutputDirByTarget(target); + var abs = new string[] { "prefabs" }; + foreach (var ab in abs) + { + string srcAb = ToRelativeAssetPath($"{outputDir}/{ab}"); + string dstAb = ToRelativeAssetPath($"{streamingAssetPathDst}/{ab}"); + Debug.Log($"[CopyAssetBundlesToStreamingAssets] copy assetbundle {srcAb} -> {dstAb}"); + AssetDatabase.CopyAsset( srcAb, dstAb); + } + } + } +} diff --git a/Assets/TEngine/Scripts/Editor/HybridCLR/BuildAssetsCommand.cs.meta b/Assets/TEngine/Scripts/Editor/HybridCLR/BuildAssetsCommand.cs.meta new file mode 100644 index 00000000..215cf8c9 --- /dev/null +++ b/Assets/TEngine/Scripts/Editor/HybridCLR/BuildAssetsCommand.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1a8357532218e6f49a9bb9401382d6d4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TEngine/Scripts/Editor/HybridCLR/BuildPlayerCommand.cs b/Assets/TEngine/Scripts/Editor/HybridCLR/BuildPlayerCommand.cs new file mode 100644 index 00000000..7cd28f4f --- /dev/null +++ b/Assets/TEngine/Scripts/Editor/HybridCLR/BuildPlayerCommand.cs @@ -0,0 +1,68 @@ +using HybridCLR.Editor.Commands; +using HybridCLR.Editor.Installer; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using HybridCLR.Editor; +using UnityEditor; +using UnityEngine; + +namespace TEngine.Editor +{ + public class BuildPlayerCommand + { + public static void CopyAssets(string outputDir) + { + Directory.CreateDirectory(outputDir); + + foreach(var srcFile in Directory.GetFiles(Application.streamingAssetsPath)) + { + string dstFile = $"{outputDir}/{Path.GetFileName(srcFile)}"; + File.Copy(srcFile, dstFile, true); + } + } + + [MenuItem("HybridCLR/Build/Win64")] + public static void Build_Win64() + { + BuildTarget target = BuildTarget.StandaloneWindows64; + BuildTarget activeTarget = EditorUserBuildSettings.activeBuildTarget; + if (activeTarget != BuildTarget.StandaloneWindows64 && activeTarget != BuildTarget.StandaloneWindows) + { + Debug.LogError("请先切到Win平台再打包"); + return; + } + // Get filename. + string outputPath = $"{SettingsUtil.ProjectDir}/Release-Win64"; + + var buildOptions = BuildOptions.CompressWithLz4; + + string location = $"{outputPath}/HybridCLRTrial.exe"; + + PrebuildCommand.GenerateAll(); + Debug.Log("====> Build App"); + BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions() + { + scenes = new string[] { "Assets/Scenes/main.unity" }, + locationPathName = location, + options = buildOptions, + target = target, + targetGroup = BuildTargetGroup.Standalone, + }; + + var report = BuildPipeline.BuildPlayer(buildPlayerOptions); + if (report.summary.result != UnityEditor.Build.Reporting.BuildResult.Succeeded) + { + Debug.LogError("打包失败"); + return; + } + + Debug.Log("====> 复制热更新资源和代码"); + BuildAssetsCommand.BuildAndCopyABAOTHotUpdateDlls(); + BashUtil.CopyDir(Application.streamingAssetsPath, $"{outputPath}/HybridCLRTrial_Data/StreamingAssets", true); +#if UNITY_EDITOR + Application.OpenURL($"file:///{location}"); +#endif + } + } +} diff --git a/Assets/TEngine/Scripts/Editor/HybridCLR/BuildPlayerCommand.cs.meta b/Assets/TEngine/Scripts/Editor/HybridCLR/BuildPlayerCommand.cs.meta new file mode 100644 index 00000000..a92dcba6 --- /dev/null +++ b/Assets/TEngine/Scripts/Editor/HybridCLR/BuildPlayerCommand.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7796c8df856ac4a4a9d644329c1f0958 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TEngine/Scripts/Editor/TEngine.Editor.asmdef b/Assets/TEngine/Scripts/Editor/TEngine.Editor.asmdef index 9b507b71..68e5a1bd 100644 --- a/Assets/TEngine/Scripts/Editor/TEngine.Editor.asmdef +++ b/Assets/TEngine/Scripts/Editor/TEngine.Editor.asmdef @@ -1,7 +1,10 @@ { "name": "TEngine.Editor", + "rootNamespace": "", "references": [ - "GUID:f4ecd6f7bd8993043b6cec60dd0cf2b2" + "GUID:f4ecd6f7bd8993043b6cec60dd0cf2b2", + "GUID:13ba8ce62aa80c74598530029cb2d649", + "GUID:2373f786d14518f44b0f475db77ba4de" ], "includePlatforms": [ "Editor" diff --git a/Assets/TEngine/Scripts/Editor/Utility/Type.cs b/Assets/TEngine/Scripts/Editor/Utility/Type.cs index 7f551d19..b4ccd08f 100644 --- a/Assets/TEngine/Scripts/Editor/Utility/Type.cs +++ b/Assets/TEngine/Scripts/Editor/Utility/Type.cs @@ -13,6 +13,7 @@ namespace TEngine.Editor { "TEngine.Runtime", "Assembly-CSharp", + "HotFix", }; private static readonly string[] RuntimeOrEditorAssemblyNames = @@ -21,6 +22,7 @@ namespace TEngine.Editor "Assembly-CSharp", "TEngine.Editor", "Assembly-CSharp-Editor", + "HotFix", }; /// diff --git a/Assets/TEngine/Scripts/Runtime/Core/LoadJob.meta b/Assets/TEngine/Scripts/Runtime/Core/LoadJob.meta new file mode 100644 index 00000000..144999f4 --- /dev/null +++ b/Assets/TEngine/Scripts/Runtime/Core/LoadJob.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 16c2d564e2614539ae1ce24761808e86 +timeCreated: 1675252193 \ No newline at end of file diff --git a/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJob.cs b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJob.cs new file mode 100644 index 00000000..8fce75d0 --- /dev/null +++ b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJob.cs @@ -0,0 +1,26 @@ +namespace TEngine.Runtime +{ + /// + /// 加载任务抽象基类。 + /// + public abstract class LoadJob + { + protected bool _isDone; + + /// + /// 任务是否完成,LoadJobManager会根据该标志判断是否加载下一个任务。 + /// + public bool IsDone => _isDone; + + /// + /// 开始任务执行,一次性初始化工作可放在其中。 + /// + public abstract void Start(); + + /// + /// 任务处理。 + /// + /// 执行进入(0 - 1)。 + public abstract float Process(); + } +} diff --git a/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJob.cs.meta b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJob.cs.meta new file mode 100644 index 00000000..7790e771 --- /dev/null +++ b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJob.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b6604789763448b7afa669c2cd352cfc +timeCreated: 1675252202 \ No newline at end of file diff --git a/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJobManager.cs b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJobManager.cs new file mode 100644 index 00000000..53ff8355 --- /dev/null +++ b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJobManager.cs @@ -0,0 +1,105 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine.SceneManagement; + +namespace TEngine.Runtime +{ + /// + /// 加载器,处理场景加载、对象预生成等需要在加载期处理的事务. + /// + public class LoadJobManager : UnitySingleton + { + System.Action _progressCallback; + System.Action _onFinishCallback; + Queue _jobQueue = new Queue(); + LoadJob _curJob = null; + int _doneJobCount; + int _jobCount; + float _progress; + + /// + /// 添加任务. + /// + /// + public void AddJob(LoadJob job) + { + _jobQueue.Enqueue(job); + } + + /// + /// 启动执行任务队列. + /// + /// 处理进度回调,参数为0-1进度 + /// 完成回调。 + public void Launch(System.Action progressCallback, System.Action onFinishCallback) + { + _progress = 0f; + _doneJobCount = 0; + _jobCount = _jobQueue.Count; + _progressCallback = progressCallback; + _onFinishCallback = onFinishCallback; + _curJob = _jobQueue.Dequeue(); + _curJob.Start(); + } + + void Update() + { + if (_curJob != null) + { + _progress = (_doneJobCount + _curJob.Process()) / _jobCount; + if (_curJob.IsDone) + { + if (_jobQueue.Count > 0) + { + _curJob = _jobQueue.Dequeue(); + _curJob.Start(); + } + else + _curJob = null; + + ++_doneJobCount; + } + + if (_progressCallback != null) + _progressCallback(_progress); + } + else + { + SingletonMgr.Release(gameObject); + _progressCallback = null; + + if (_onFinishCallback != null) + _onFinishCallback(); + } + } + + /// + /// 异步加载场景。 + /// + /// 场景名称。 + /// 加载函数回调。 + /// 加载完成回调。 + /// 场景加载模式。 + public void LoadSceneAsync(string sceneName, System.Action progressCallback = null, System.Action callback = null, LoadSceneMode mode = LoadSceneMode.Single) + { + MonoUtility.StartCoroutine(LoadJobManager.Instance.LoadJobManagerLoadScene(sceneName, progressCallback, callback, mode)); + } + + private IEnumerator LoadJobManagerLoadScene(string sceneName, System.Action progressCallback = null, System.Action callback = null, + LoadSceneMode mode = LoadSceneMode.Single) + { + bool isLoadEnd = false; + Instance.AddJob(new SceneLoadJob(sceneName, LoadSceneMode.Single)); + Instance.Launch(progressCallback, () => + { + callback?.Invoke(); + isLoadEnd = true; + }); + yield return null; + while (!isLoadEnd) + { + yield return null; + } + } + } +} \ No newline at end of file diff --git a/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJobManager.cs.meta b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJobManager.cs.meta new file mode 100644 index 00000000..0c8c6f23 --- /dev/null +++ b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/LoadJobManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b5bbbf8a8cdf4a1fb239ddbc8fd855f2 +timeCreated: 1675252202 \ No newline at end of file diff --git a/Assets/TEngine/Scripts/Runtime/Core/LoadJob/SceneLoadJob.cs b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/SceneLoadJob.cs new file mode 100644 index 00000000..749485bc --- /dev/null +++ b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/SceneLoadJob.cs @@ -0,0 +1,56 @@ +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace TEngine.Runtime +{ + /// + /// 场景加载任务 + /// + public class SceneLoadJob : LoadJob + { + AsyncOperation _asyncOp; + string _sceneName; + LoadSceneMode _loadMode; + + /// + /// 构造方法 + /// + /// 场景名 + public SceneLoadJob(string sceneName, LoadSceneMode mode = LoadSceneMode.Single) + { + _sceneName = sceneName; + _loadMode = mode; + } + + /// + /// 开始执行加载任务,强制卸载未引用的AB资源,开始LoadScene + /// + public override void Start() + { + //经讨论对象池清理策略交由项目组控制更合理 + ResMgr.Instance.UnloadUnusedAssetBundle(); + _asyncOp = ResMgr.Instance.LoadScene(_sceneName, _loadMode); + } + + /// + /// 处理加载任务 + /// + /// + public override float Process() + { + if (_asyncOp != null) + { + if (_asyncOp.isDone) + { + _isDone = true; + + return 1f; + } + else + return _asyncOp.progress / 0.9f; + } + else + return 0f; + } + } +} diff --git a/Assets/TEngine/Scripts/Runtime/Core/LoadJob/SceneLoadJob.cs.meta b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/SceneLoadJob.cs.meta new file mode 100644 index 00000000..138792f9 --- /dev/null +++ b/Assets/TEngine/Scripts/Runtime/Core/LoadJob/SceneLoadJob.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d14939b3184744598b90eebd67b4bf5f +timeCreated: 1675252346 \ No newline at end of file diff --git a/Assets/TEngine/Scripts/Runtime/Core/Res/DefaultResourcesHelper/AssetConfig.cs b/Assets/TEngine/Scripts/Runtime/Core/Res/DefaultResourcesHelper/AssetConfig.cs index eea9f2fc..a386cc0d 100644 --- a/Assets/TEngine/Scripts/Runtime/Core/Res/DefaultResourcesHelper/AssetConfig.cs +++ b/Assets/TEngine/Scripts/Runtime/Core/Res/DefaultResourcesHelper/AssetConfig.cs @@ -56,6 +56,7 @@ namespace TEngine.Runtime { assetPaths[j] = reader.ReadString(); _assetPath2BundleDatas.Add(assetPaths[j], bundleName); + Log.Error($"Init Ab {assetPaths[j]} bundleName {bundleName}"); } depCount = reader.ReadInt32(); if (!_bundleDatas.TryGetValue(bundleName, out assetBundleData)) diff --git a/Assets/TEngine/Scripts/Runtime/Core/Res/DefaultResourcesHelper/ResMgr.cs b/Assets/TEngine/Scripts/Runtime/Core/Res/DefaultResourcesHelper/ResMgr.cs index fecebe99..3052e070 100644 --- a/Assets/TEngine/Scripts/Runtime/Core/Res/DefaultResourcesHelper/ResMgr.cs +++ b/Assets/TEngine/Scripts/Runtime/Core/Res/DefaultResourcesHelper/ResMgr.cs @@ -1,15 +1,23 @@ using System.Collections.Generic; using System.IO; using UnityEngine; +using UnityEngine.SceneManagement; namespace TEngine.Runtime { + internal class SceneAssetData + { + public AssetData _assetData; + public LoadSceneMode _loadSceneMode = LoadSceneMode.Single; + } + internal class ResMgr : TSingleton { AssetConfig _assetConfig = new AssetConfig(); private Dictionary _scriptableObjects = new Dictionary(); public ResMgr() { + MonoUtility.AddUpdateListener(Update); _assetConfig.Load(); } @@ -27,6 +35,15 @@ namespace TEngine.Runtime _assetConfig.MaxUnloadNumPerFrame = value; } + /// + /// 资源更新重载。 + /// + public void ReLoad() + { + _assetConfig.Unload(); + _assetConfig.Load(); + } + /// /// 卸载无用资源 /// @@ -355,5 +372,131 @@ namespace TEngine.Runtime return $"{Application.dataPath}/TResources/{rawPath}"; #endif } + + #region Scene + //已经加载好的场景 + private List _loadedScenes = new List(); + + //加载中的场景 + private List _loadingScenes = new List(); + + private List _cachedDeleteFromLoadingScenes = new List(); + /// + /// 场景加载 + /// + /// 场景名 + /// /// 加载模式 + /// 异步操作对象 + /// SceneLoader提供了加载进度展示,也可以自定义包装来加载场景 + public AsyncOperation LoadScene(string sceneName, LoadSceneMode mode = LoadSceneMode.Single) + { + AssetData assetData = _assetConfig.GetSceneAsset(sceneName, mode); + SceneAssetData sData = new SceneAssetData(); + sData._assetData = assetData; + sData._loadSceneMode = mode; + if(assetData != null) + { + _loadingScenes.Add(sData); + assetData.AddRef(); + + return assetData.AsyncOp; + } + else + return null; + } + + /// + /// 场景是否已经加载过了 + /// + /// + /// + public bool IsSceneLoaded(string sceneName) + { + foreach (SceneAssetData loadedScene in _loadedScenes) + { + if (loadedScene != null + && loadedScene._assetData != null + && !string.IsNullOrEmpty(loadedScene._assetData.Name) + && loadedScene._assetData.Name.Equals(sceneName)) + { + return true; + } + } + return false; + } + + /// + /// 场景是否在加载过程中 + /// + /// + /// + public bool IsSceneLoading(string sceneName) + { + foreach (SceneAssetData loadingScene in _loadingScenes) + { + if (loadingScene._assetData != null + && !string.IsNullOrEmpty(loadingScene._assetData.Name) + && loadingScene._assetData.Name.Equals(sceneName)) + { + return true; + } + } + return false; + } + + /// + /// 清理掉已经加载的场景 + /// + void UnloadLoadedScenes() + { + foreach (SceneAssetData loadedScene in _loadedScenes) + { + if (loadedScene != null && loadedScene._assetData != null) + { + loadedScene._assetData.DecRef(true); + } + } + _loadedScenes.Clear(); + Resources.UnloadUnusedAssets(); + } + + /// + /// 轮询资源。 + /// + private void Update() + { + _assetConfig.Update(Time.deltaTime); + + foreach (SceneAssetData loadingScene in _loadingScenes) + { + if (loadingScene._assetData != null &&loadingScene._assetData.AsyncOp != null) + { + if (!loadingScene._assetData.AsyncOp.isDone) + { + if (loadingScene._assetData.AsyncOp.progress >= 0.9f) + { + if (loadingScene._loadSceneMode == LoadSceneMode.Single) + { + UnloadLoadedScenes(); + } + // 激活新场景 + loadingScene._assetData.AsyncOp.allowSceneActivation = true; + _cachedDeleteFromLoadingScenes.Add(loadingScene); + _loadedScenes.Add(loadingScene); + } + } + } + } + + //从Loading队列中删除掉加载完成的场景 + foreach (SceneAssetData deleteScene in _cachedDeleteFromLoadingScenes) + { + _loadingScenes.Remove(deleteScene); + } + _cachedDeleteFromLoadingScenes.Clear(); + + } + + #endregion } } \ No newline at end of file diff --git a/Assets/TEngine/Scripts/Runtime/Core/Version/GameConfig.cs b/Assets/TEngine/Scripts/Runtime/Core/Version/GameConfig.cs index bfffdbae..19a88be5 100644 --- a/Assets/TEngine/Scripts/Runtime/Core/Version/GameConfig.cs +++ b/Assets/TEngine/Scripts/Runtime/Core/Version/GameConfig.cs @@ -64,9 +64,7 @@ namespace TEngine.Runtime if (configContent == string.Empty) { #if !UNITY_EDITOR -#if RELEASE_BUILD || _DEVELOPMENT_BUILD_ TLogger.LogError($"version config not find in InnerPath,please check it"); -#endif return false; #endif } @@ -146,6 +144,10 @@ namespace TEngine.Runtime { get { + if (string.IsNullOrEmpty(_versionConfig.ResVersion)) + { + return "0"; + } return _versionConfig.ResVersion; } set diff --git a/Assets/TEngine/Scripts/Runtime/Core/Version/Version.cs b/Assets/TEngine/Scripts/Runtime/Core/Version/Version.cs index 46cc6a5f..1554d2e5 100644 --- a/Assets/TEngine/Scripts/Runtime/Core/Version/Version.cs +++ b/Assets/TEngine/Scripts/Runtime/Core/Version/Version.cs @@ -29,6 +29,7 @@ { if (s_VersionHelper == null) { + Log.Fatal("s_VersionHelper is null GameVersion"); return string.Empty; } @@ -45,6 +46,7 @@ { if (s_VersionHelper == null) { + Log.Fatal("s_VersionHelper is null InternalGameVersion"); return 0; } diff --git a/Assets/GameMain/Scripts/GameProcedure.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure.meta diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureCheckVersion.cs b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCheckVersion.cs similarity index 91% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureCheckVersion.cs rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCheckVersion.cs index 082fe867..9312d2dd 100644 --- a/Assets/GameMain/Scripts/GameProcedure/ProcedureCheckVersion.cs +++ b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCheckVersion.cs @@ -29,13 +29,13 @@ namespace TEngine.Runtime UILoadMgr.Show(UIDefine.UILoadUpdate); } - protected override void OnEnter(IFsm procedureOwner) + protected internal override void OnEnter(IFsm procedureOwner) { base.OnEnter(procedureOwner); m_CheckVersionComplete = false; m_NeedUpdateVersion = false; m_VersionInfo = null; - + Log.Warning("On Enter ProcedureCheckVersion"); PreLoadHotUpdate(); RequestVersion(); @@ -46,6 +46,7 @@ namespace TEngine.Runtime /// private void RequestVersion() { + Log.Warning("On RequestVersion"); _curTryCount++; if (_curTryCount > MaxTryCount) @@ -74,9 +75,9 @@ namespace TEngine.Runtime Application.Quit); return; } - TLogger.LogInfo("LoadMgr.RequestVersion, proxy:" + checkVersionUrl); + Log.Warning("LoadMgr.RequestVersion, proxy:" + checkVersionUrl); - Log.Info($"Check Version Url=>{checkVersionUrl}"); + Log.Warning($"Check Version Url=>{checkVersionUrl}"); m_UnityWebRequest = UnityWebRequest.Get(checkVersionUrl); @@ -163,7 +164,7 @@ namespace TEngine.Runtime return data; } - protected override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) + protected internal override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) { base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds); if (m_result == null || !m_result.isDone) @@ -227,13 +228,17 @@ namespace TEngine.Runtime byte[] versionInfoBytes = m_UnityWebRequest.downloadHandler.data; string versionInfoString = Utility.Converter.GetString(versionInfoBytes); m_VersionInfo = Utility.Json.ToObject(versionInfoString); + Log.Error("m_VersionInfo.ToString()" + m_VersionInfo.ToString()); if (m_VersionInfo == null) { Log.Fatal("Parse VersionInfo failure."); return; } - - Log.Info("Latest game version is '{0} ({1})', local game version is '{2} ({3})'.", + Log.Error(" m_VersionInfo.GameVersion" + m_VersionInfo.GameVersion); + Log.Error(" m_VersionInfo.InternalResourceVersion" + m_VersionInfo.InternalResourceVersion); + Log.Error(" m_VersionInfo.GameVersion" + Version.GameVersion); + Log.Error(" m_VersionInfo.InternalGameVersion" + Version.InternalGameVersion); + Log.Error("Latest game version is '{0} ({1})', local game version is '{2} ({3})'.", m_VersionInfo.GameVersion, m_VersionInfo.InternalResourceVersion.ToString(), Version.GameVersion, diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureCheckVersion.cs.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCheckVersion.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureCheckVersion.cs.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCheckVersion.cs.meta diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureCodeInit.cs b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCodeInit.cs similarity index 71% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureCodeInit.cs rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCodeInit.cs index 69667d7a..652f8579 100644 --- a/Assets/GameMain/Scripts/GameProcedure/ProcedureCodeInit.cs +++ b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCodeInit.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using System.Reflection; using HybridCLR; @@ -17,8 +18,16 @@ namespace TEngine.Runtime "mscorlib.dll", "System.dll", "System.Core.dll", + "HotFix.dll", }; + private static Dictionary _AssetDatas = new Dictionary(); + + public static byte[] GetAssetData(string dllName) + { + return _AssetDatas[dllName]; + } + /// /// 为aot assembly加载原始metadata, 这个代码放aot或者热更新都行。 /// 一旦加载后,如果AOT泛型函数对应native实现不存在,则自动替换为解释模式执行 @@ -30,16 +39,25 @@ namespace TEngine.Runtime // 注意,补充元数据是给AOT dll补充元数据,而不是给热更新dll补充元数据。 // 热更新dll不缺元数据,不需要补充,如果调用LoadMetadataForAOTAssembly会返回错误 + HomologousImageMode mode = HomologousImageMode.SuperSet; + foreach (var aotDllName in AOTMetaAssemblyNames) { - byte[] dllBytes = TResources.Load(aotDllName)?.bytes; + var path = "DLL/" + aotDllName + ".bytes"; + Log.Warning(path); + byte[] dllBytes = TResources.Load(path)?.bytes; if (dllBytes == null) { Log.Fatal($"{aotDllName} is null"); continue; } + else + { + _AssetDatas[aotDllName+".bytes"] = dllBytes; + } + // 加载assembly对应的dll,会自动为它hook。一旦aot泛型函数的native函数不存在,用解释器版本代码 - LoadImageErrorCode err = RuntimeApi.LoadMetadataForAOTAssembly(dllBytes); + LoadImageErrorCode err = RuntimeApi.LoadMetadataForAOTAssembly(dllBytes,mode); Log.Info($"LoadMetadataForAOTAssembly:{aotDllName}. ret:{err}"); } } @@ -51,10 +69,12 @@ namespace TEngine.Runtime private IFsm m_procedureOwner; - protected override void OnEnter(IFsm procedureOwner) + protected internal override void OnEnter(IFsm procedureOwner) { base.OnEnter(procedureOwner); - + + LoadJobManager.Instance.LoadSceneAsync("L2Scene"); + m_procedureOwner = procedureOwner; if (!NeedLoadDll) @@ -66,28 +86,20 @@ namespace TEngine.Runtime LoadMetadataForAOTAssemblies(); #if UNITY_EDITOR - Assembly hotfixAssembly = System.AppDomain.CurrentDomain.GetAssemblies().First(assembly => assembly.GetName().Name == "Assembly-CSharp"); - StartHotfix(hotfixAssembly); + Assembly hotfixAssembly = System.AppDomain.CurrentDomain.GetAssemblies().First(assembly => assembly.GetName().Name == "HotFix"); + StartHotfixEntry(hotfixAssembly); #else - TResources.LoadAsync("Dll/HotFix.dll.bytes", (data => + try { - if (data == null) - { - OnLoadAssetFail(); - return; - } - var obj = data as TextAsset; - - if (obj == null) - { - OnLoadAssetFail(); - return; - } - else - { - OnLoadAssetSuccess(obj); - } - })); + Assembly hotfixAssembly =System.Reflection.Assembly.Load(GetAssetData("HotFix.dll.bytes")); + StartHotfixEntry(hotfixAssembly); + } + catch (Exception e) + { + OnLoadAssetFail(); + Log.Error(e.Message); + throw; + } #endif } @@ -96,7 +108,7 @@ namespace TEngine.Runtime TextAsset dll = (TextAsset)asset; Assembly hotfixAssembly = System.Reflection.Assembly.Load(dll.bytes); Log.Info("Load hotfix dll OK."); - StartHotfix(hotfixAssembly); + StartHotfixEntry(hotfixAssembly); } private void OnLoadAssetFail() @@ -104,7 +116,7 @@ namespace TEngine.Runtime Log.Error("Load hotfix dll failed. "); } - private void StartHotfix(Assembly hotfixAssembly) + private void StartHotfixEntry(Assembly hotfixAssembly) { var hotfixEntry = hotfixAssembly.GetType("HotFix.GameHotfixEntry"); var start = hotfixEntry.GetMethod("Start"); diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureCodeInit.cs.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCodeInit.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureCodeInit.cs.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureCodeInit.cs.meta diff --git a/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureLaunch.cs b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureLaunch.cs new file mode 100644 index 00000000..dfc38cb9 --- /dev/null +++ b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureLaunch.cs @@ -0,0 +1,20 @@ +namespace TEngine.Runtime +{ + /// + /// 流程加载器 - 开始起点 + /// + public class ProcedureLaunch : ProcedureBase + { + protected internal override void OnEnter(IFsm procedureOwner) + { + base.OnEnter(procedureOwner); + ResMgr.Instance.Active(); + } + + protected internal override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) + { + base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds); + ChangeState(procedureOwner); + } + } +} \ No newline at end of file diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureLaunch.cs.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureLaunch.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureLaunch.cs.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureLaunch.cs.meta diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesInit.cs b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesInit.cs similarity index 79% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesInit.cs rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesInit.cs index 498acf9b..1d8b92df 100644 --- a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesInit.cs +++ b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesInit.cs @@ -11,7 +11,7 @@ namespace TEngine.Runtime private bool m_initResourceComplete = false; - protected override void OnEnter(IFsm procedureOwner) + protected internal override void OnEnter(IFsm procedureOwner) { base.OnEnter(procedureOwner); @@ -23,7 +23,7 @@ namespace TEngine.Runtime }),new WaitForSeconds(1f)); } - protected override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) + protected internal override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) { base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds); @@ -34,7 +34,7 @@ namespace TEngine.Runtime } - protected override void OnLeave(IFsm procedureOwner, bool isShutdown) + protected internal override void OnLeave(IFsm procedureOwner, bool isShutdown) { base.OnLeave(procedureOwner, isShutdown); GameEvent.RemoveEventListener(OnInitResourceCompleteEvent, OnInitResourceComplete); diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesInit.cs.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesInit.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesInit.cs.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesInit.cs.meta diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesUpdate.cs b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesUpdate.cs similarity index 94% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesUpdate.cs rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesUpdate.cs index 505fb5eb..2a96f21f 100644 --- a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesUpdate.cs +++ b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesUpdate.cs @@ -1,6 +1,7 @@ using System; using TEngine.Runtime.HotUpdate; using UnityEngine; +using UnityEngine.SceneManagement; namespace TEngine.Runtime { @@ -14,7 +15,7 @@ namespace TEngine.Runtime private IFsm _procedureOwner; private bool _dllLoad = false; - protected override void OnEnter(IFsm procedureOwner) + protected internal override void OnEnter(IFsm procedureOwner) { base.OnEnter(procedureOwner); @@ -85,7 +86,7 @@ namespace TEngine.Runtime LoadMgr.Instance.StartUpdate(data.List); }, () => { - StartGame(); + ProcedureCodeInit(); }); } //不提示 @@ -107,7 +108,7 @@ namespace TEngine.Runtime LoadMgr.Instance.StartUpdate(data.List); }, () => { - StartGame(); + ProcedureCodeInit(); }); } //不提示 @@ -124,9 +125,9 @@ namespace TEngine.Runtime return false; } - private void StartGame() + private void ProcedureCodeInit() { - ChangeState(_procedureOwner); + ChangeState(_procedureOwner); } /// @@ -144,6 +145,7 @@ namespace TEngine.Runtime _onlineVersionInfo.ResourceVersion = int.Parse(GameConfig.Instance.ResId); } GameConfig.Instance.WriteResVersion(_onlineVersionInfo.ResourceVersion.ToString()); + ResMgr.Instance.ReLoad(); UILoadMgr.Show(UIDefine.UILoadUpdate, "所有资源下载完成,稍后进入游戏!"); LoaderUtilities.DelayFun((() => { @@ -165,7 +167,7 @@ namespace TEngine.Runtime if (_dllLoad == false) { - StartGame(); + ProcedureCodeInit(); } else { diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesUpdate.cs.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesUpdate.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesUpdate.cs.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesUpdate.cs.meta diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesVerify.cs b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesVerify.cs similarity index 83% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesVerify.cs rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesVerify.cs index e543c24f..2e412743 100644 --- a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesVerify.cs +++ b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesVerify.cs @@ -8,7 +8,7 @@ namespace TEngine.Runtime { private bool m_VerifyResourcesComplete = false; - protected override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) + protected internal override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) { base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds); diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesVerify.cs.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesVerify.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureResourcesVerify.cs.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureResourcesVerify.cs.meta diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureSplash.cs b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureSplash.cs similarity index 70% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureSplash.cs rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureSplash.cs index a480dd0d..faab27ad 100644 --- a/Assets/GameMain/Scripts/GameProcedure/ProcedureSplash.cs +++ b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureSplash.cs @@ -11,17 +11,7 @@ namespace TEngine.Runtime /// public class ProcedureSplash : ProcedureBase { - protected override void OnInit(IFsm procedureOwner) - { - base.OnInit(procedureOwner); - } - - protected override void OnEnter(IFsm procedureOwner) - { - base.OnEnter(procedureOwner); - } - - protected override void OnUpdate(IFsm procedureOwner, float elapseSeconds, + protected internal override void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) { base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds); diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureSplash.cs.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureSplash.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureSplash.cs.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureSplash.cs.meta diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureStartGame.cs b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureStartGame.cs similarity index 83% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureStartGame.cs rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureStartGame.cs index 52c78945..d39a4efc 100644 --- a/Assets/GameMain/Scripts/GameProcedure/ProcedureStartGame.cs +++ b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureStartGame.cs @@ -10,7 +10,7 @@ /// public class ProcedureStartGame : ProcedureBase { - protected override void OnEnter(IFsm procedureOwner) + protected internal override void OnEnter(IFsm procedureOwner) { base.OnEnter(procedureOwner); GameEvent.Send(TEngineEvent.OnStartGame); diff --git a/Assets/GameMain/Scripts/GameProcedure/ProcedureStartGame.cs.meta b/Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureStartGame.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/GameProcedure/ProcedureStartGame.cs.meta rename to Assets/TEngine/Scripts/Runtime/GameProcedure/ProcedureStartGame.cs.meta diff --git a/Assets/TEngine/Scripts/Runtime/TEngine.Runtime.asmdef b/Assets/TEngine/Scripts/Runtime/TEngine.Runtime.asmdef index 0c667baa..8dee4e4e 100644 --- a/Assets/TEngine/Scripts/Runtime/TEngine.Runtime.asmdef +++ b/Assets/TEngine/Scripts/Runtime/TEngine.Runtime.asmdef @@ -1,6 +1,9 @@ { "name": "TEngine.Runtime", - "references": [], + "rootNamespace": "", + "references": [ + "GUID:13ba8ce62aa80c74598530029cb2d649" + ], "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": true, diff --git a/Assets/TResources.meta b/Assets/TResources.meta new file mode 100644 index 00000000..58ad8517 --- /dev/null +++ b/Assets/TResources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f680c7d1ec718384a8960405c3cf412c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/DLL.meta b/Assets/TResources/DLL.meta new file mode 100644 index 00000000..12c450d8 --- /dev/null +++ b/Assets/TResources/DLL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c0ec9fb4455500c418e4543b03e6de32 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/DLL/Assembly-CSharp.dll.bytes b/Assets/TResources/DLL/Assembly-CSharp.dll.bytes new file mode 100644 index 00000000..abd5fc20 Binary files /dev/null and b/Assets/TResources/DLL/Assembly-CSharp.dll.bytes differ diff --git a/Assets/TResources/DLL/Assembly-CSharp.dll.bytes.meta b/Assets/TResources/DLL/Assembly-CSharp.dll.bytes.meta new file mode 100644 index 00000000..b684344d --- /dev/null +++ b/Assets/TResources/DLL/Assembly-CSharp.dll.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 31f0b82c8b629874a929f0415349de31 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/DLL/HotFix.dll.bytes b/Assets/TResources/DLL/HotFix.dll.bytes new file mode 100644 index 00000000..353f25ac Binary files /dev/null and b/Assets/TResources/DLL/HotFix.dll.bytes differ diff --git a/Assets/TResources/DLL/HotFix.dll.bytes.meta b/Assets/TResources/DLL/HotFix.dll.bytes.meta new file mode 100644 index 00000000..90bac38c --- /dev/null +++ b/Assets/TResources/DLL/HotFix.dll.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1c967e0a965235b44af7259c3e3ef168 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/DLL/System.Core.dll.bytes b/Assets/TResources/DLL/System.Core.dll.bytes new file mode 100644 index 00000000..bdefd3e2 Binary files /dev/null and b/Assets/TResources/DLL/System.Core.dll.bytes differ diff --git a/Assets/TResources/DLL/System.Core.dll.bytes.meta b/Assets/TResources/DLL/System.Core.dll.bytes.meta new file mode 100644 index 00000000..e00ff7ee --- /dev/null +++ b/Assets/TResources/DLL/System.Core.dll.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 30e2f0d687184a8448520c005e0c2209 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/DLL/System.dll.bytes b/Assets/TResources/DLL/System.dll.bytes new file mode 100644 index 00000000..79f505cd Binary files /dev/null and b/Assets/TResources/DLL/System.dll.bytes differ diff --git a/Assets/TResources/DLL/System.dll.bytes.meta b/Assets/TResources/DLL/System.dll.bytes.meta new file mode 100644 index 00000000..47448c0e --- /dev/null +++ b/Assets/TResources/DLL/System.dll.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b303ee89f077b5547a60463cc75ac848 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/DLL/mscorlib.dll.bytes b/Assets/TResources/DLL/mscorlib.dll.bytes new file mode 100644 index 00000000..8d1acbd6 Binary files /dev/null and b/Assets/TResources/DLL/mscorlib.dll.bytes differ diff --git a/Assets/TResources/DLL/mscorlib.dll.bytes.meta b/Assets/TResources/DLL/mscorlib.dll.bytes.meta new file mode 100644 index 00000000..d6e21b0e --- /dev/null +++ b/Assets/TResources/DLL/mscorlib.dll.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 61f6fb6229a8dc146bb64994606d55d4 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/Scenes.meta b/Assets/TResources/Scenes.meta new file mode 100644 index 00000000..1cc03bc6 --- /dev/null +++ b/Assets/TResources/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13675d0792312164b9f26d38cafb21a2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/Scenes/L2Scene.unity b/Assets/TResources/Scenes/L2Scene.unity new file mode 100644 index 00000000..670016be --- /dev/null +++ b/Assets/TResources/Scenes/L2Scene.unity @@ -0,0 +1,523 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &69435528 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 69435529} + m_Layer: 0 + m_Name: L2SceneTag + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &69435529 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 69435528} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &525849947 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 525849949} + - component: {fileID: 525849948} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &525849948 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 525849947} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &525849949 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 525849947} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &914001103 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 914001107} + - component: {fileID: 914001106} + - component: {fileID: 914001105} + - component: {fileID: 914001104} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &914001104 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 914001103} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &914001105 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 914001103} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &914001106 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 914001103} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &914001107 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 914001103} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1067153380 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1067153384} + - component: {fileID: 1067153383} + - component: {fileID: 1067153382} + - component: {fileID: 1067153381} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!136 &1067153381 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067153380} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1067153382 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067153380} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1067153383 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067153380} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1067153384 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067153380} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 2.04, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1697149901 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1697149904} + - component: {fileID: 1697149903} + - component: {fileID: 1697149902} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1697149902 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1697149901} + m_Enabled: 1 +--- !u!20 &1697149903 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1697149901} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1697149904 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1697149901} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/TResources/Scenes/L2Scene.unity.meta b/Assets/TResources/Scenes/L2Scene.unity.meta new file mode 100644 index 00000000..43e238bd --- /dev/null +++ b/Assets/TResources/Scenes/L2Scene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b874a93b1508f04489c3daedc7265500 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/Test.meta b/Assets/TResources/Test.meta new file mode 100644 index 00000000..40cdd63c --- /dev/null +++ b/Assets/TResources/Test.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 99f344a2f6a21ef408cd2e02d81a4e12 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TResources/Test/Cube.prefab b/Assets/TResources/Test/Cube.prefab new file mode 100644 index 00000000..da83e2c5 --- /dev/null +++ b/Assets/TResources/Test/Cube.prefab @@ -0,0 +1,97 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5866157958383304021 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4968753014325038075} + - component: {fileID: 7799670979567356265} + - component: {fileID: 1614920880721590745} + - component: {fileID: 1765467406701699960} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4968753014325038075 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5866157958383304021} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &7799670979567356265 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5866157958383304021} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1614920880721590745 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5866157958383304021} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &1765467406701699960 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5866157958383304021} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/TResources/Test/Cube.prefab.meta b/Assets/TResources/Test/Cube.prefab.meta new file mode 100644 index 00000000..936b3cc0 --- /dev/null +++ b/Assets/TResources/Test/Cube.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fcabdfa8af84b004488065726a1cbea5 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/HybridCLRData/README.md b/HybridCLRData/README.md deleted file mode 100644 index 436331c2..00000000 --- a/HybridCLRData/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# 使用说明 - -这个目录主要包含 - -- huatuo相关仓库 -- 本地il2cpp目录 -- 其他生成的目录 - -## 安装huatuo - -正常情况下,安装huatuo需要替换Unity安装目录下libil2cpp目录为huatuo版本的实现,但Unity允许使用环境变量UNITY_IL2CPP_PATH自定义%IL2CPP_PATH%的位置。 -因此我们不修改原始的il2cpp目录,直接在本地创建huatuo版本的il2cpp,并让环境变量指向它 - -安装流程 - -- 酌情修改 init_local_il2cpp_data.bat(或.sh)文件中代码 - - `set IL2CPP_BRANCH=2020.3.33` 改成你的版本(目前只有2020.3.33或2021.3.1) - - `set IL2CPP_PATH=<你的Unity editor的il2cpp目录的路径>` 改成你的Unity安装目录 -- 运行 init_local_il2cpp_data.bat 或.sh 文件 创建本地il2cpp目录,即 LocalIl2CppData 目录。 - -如果看到初始化成功,表示运行成功。否则请参照文档,对应 .bat或.sh文件,自己查找错误原因。 - diff --git a/HybridCLRData/init_local_il2cpp_data.bat b/HybridCLRData/init_local_il2cpp_data.bat deleted file mode 100644 index d65f00b5..00000000 --- a/HybridCLRData/init_local_il2cpp_data.bat +++ /dev/null @@ -1,61 +0,0 @@ -@echo off - -rem set default branch -set IL2CPP_BRANCH=__VERSION__ - -if exist hybridclr_repo rd /s /q hybridclr_repo -rem git clone https://github.com/focus-creative-games/hybridclr -git clone --depth=1 https://gitee.com/focus-creative-games/hybridclr hybridclr_repo - -if exist il2cpp_plus_repo rd /s /q il2cpp_plus_repo -rem git clone https://github.com/focus-creative-games/il2cpp_hybridclr -git clone --depth=1 -b %IL2CPP_BRANCH% https://gitee.com/focus-creative-games/il2cpp_plus il2cpp_plus_repo - - -rem replace with right Unity Editor Install path -set IL2CPP_PATH=__PATH__ - -if not exist "%IL2CPP_PATH%" ( - echo "please set correct IL2CPP_PATH value" - goto EXIT -) - -set LOCAL_IL2CPP_DATA=LocalIl2CppData - -if not exist %LOCAL_IL2CPP_DATA% ( - mkdir %LOCAL_IL2CPP_DATA% -) - -rem need copdy MonoBleedingEdge -set MBE=%LOCAL_IL2CPP_DATA%\MonoBleedingEdge -if not exist %MBE% ( - xcopy /q /i /e "%IL2CPP_PATH%\..\MonoBleedingEdge" %MBE% -) - - -rem copy il2cpp -set IL2CPP=%LOCAL_IL2CPP_DATA%\il2cpp -if not exist %IL2CPP% ( - xcopy /q /i /e "%IL2CPP_PATH%" %IL2CPP% -) - -set HYBRIDCLR_REPO_DIR=hybridclr_repo - -set IL2CPP_PLUS_REPO_DIR=il2cpp_plus_repo - -set LIBIL2CPP_PATH=%LOCAL_IL2CPP_DATA%\il2cpp\libil2cpp -rd /s /q %LIBIL2CPP_PATH% - -xcopy /q /i /e %IL2CPP_PLUS_REPO_DIR%\libil2cpp %LIBIL2CPP_PATH% -xcopy /q /i /e %HYBRIDCLR_REPO_DIR%\hybridclr %LIBIL2CPP_PATH%\hybridclr - -rem clean il2cpp build cache -set IL2CPP_CACHE=..\Library\Il2cppBuildCache -echo clean %IL2CPP_CACHE% -if exist "%IL2CPP_CACHE%" rd /s /q "%IL2CPP_CACHE%" - -echo success - -:EXIT - -PAUSE \ No newline at end of file diff --git a/HybridCLRData/init_local_il2cpp_data.sh b/HybridCLRData/init_local_il2cpp_data.sh deleted file mode 100644 index b9c1e7fa..00000000 --- a/HybridCLRData/init_local_il2cpp_data.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# 设置默认分支为2020.3.33,避免很多人忘了切分支 -IL2CPP_BRANCH=__VERSION__ - -rm -rf hybridclr_repo -# clone huatuo仓库,国内推荐用 gitee -# git clone https://github.com/focus-creative-games/hybridclr -git clone --depth=1 https://gitee.com/focus-creative-games/hybridclr hybridclr_repo - -rm -rf il2cpp_plus_repo -# git clone https://github.com/focus-creative-games/il2cpp_plus -git clone --depth=1 -b $IL2CPP_BRANCH https://gitee.com/focus-creative-games/il2cpp_plus il2cpp_plus_repo - - -# 请修改为你所用Unity的il2cpp目录 -# 一般像这样 -# C:\Program Files\Unity\Hub\Editor\2020.3.33f1c2\Editor\Data\il2cpp -# /Applications/Unity/Hub/Editor/2020.3.33f1/Unity.app/Contents/il2cpp -IL2CPP_PATH='__PATH__' - -if [ ! -d "$IL2CPP_PATH" ] ; then - echo "你未指定正确的il2cpp路径" - exit 1 -fi - -LOCAL_IL2CPP_DATA=LocalIl2CppData - -if [ ! -d "$LOCAL_IL2CPP_DATA" ]; then - mkdir $LOCAL_IL2CPP_DATA -fi - - -# Unity 打包时允许使用环境变量UNITY_IL2CPP_PATH自定义%IL2CPP_PATH%的位置 -# 但同时又要求同级目录包含MonoBleedingEdge,因此需要拷贝这两个目录 - -# 拷贝 MonoBleedingEdge 目录 -MBE=$LOCAL_IL2CPP_DATA/MonoBleedingEdge -if [ ! -d "$MBE" ]; then - cp -r "$IL2CPP_PATH/../MonoBleedingEdge" $MBE -fi - - -# 拷贝il2cpp目录 -IL2CPP=$LOCAL_IL2CPP_DATA/il2cpp -if [ ! -d "$IL2CPP" ]; then - cp -r "$IL2CPP_PATH" "$IL2CPP" -fi - -# 接下来替换 il2cpp目录下的libil2cpp为 huatuo修改后的版本 -# 需要使用 {https://gitee.com/focus-creative-games/il2cpp_plus}/libil2cpp 替换 il2cpp/libil2cpp目录 -# 需要使用 {https://gitee.com/focus-creative-games/hybridclr}/huatuo 添加到 il2cpp/libil2cpp目录下,即il2cpp/libil2cpp/huatuo - -HYBRIDCLR_REPO_DIR=hybridclr_repo -IL2CPP_PLUS_REPO_DIR=il2cpp_plus_repo - -LIBIL2CPP_PATH=$LOCAL_IL2CPP_DATA/il2cpp/libil2cpp -rm -rf "$LIBIL2CPP_PATH" - -cp -r "$IL2CPP_PLUS_REPO_DIR/libil2cpp" "$LIBIL2CPP_PATH" -cp -r "$HYBRIDCLR_REPO_DIR/huatuo" "$LIBIL2CPP_PATH/huatuo" - -# 务必清除缓存,不然build仍然使用旧版本。 -# 只影响直接build的情况,不影响导出工程的情形。 - -echo 清除 Library/Il2cppBuildCache 缓存目录 -rm -rf ../Library/Il2cppBuildCache - -echo 初始化成功 diff --git a/HybridCLRData/init_local_il2cpp_data_temp.bat b/HybridCLRData/init_local_il2cpp_data_temp.bat deleted file mode 100644 index 323ecdd4..00000000 --- a/HybridCLRData/init_local_il2cpp_data_temp.bat +++ /dev/null @@ -1,61 +0,0 @@ -@echo off - -rem set default branch -set IL2CPP_BRANCH=2020.3.33 - -if exist hybridclr_repo rd /s /q hybridclr_repo -rem git clone https://github.com/focus-creative-games/hybridclr -git clone --depth=1 https://gitee.com/focus-creative-games/hybridclr hybridclr_repo - -if exist il2cpp_plus_repo rd /s /q il2cpp_plus_repo -rem git clone https://github.com/focus-creative-games/il2cpp_hybridclr -git clone --depth=1 -b %IL2CPP_BRANCH% https://gitee.com/focus-creative-games/il2cpp_plus il2cpp_plus_repo - - -rem replace with right Unity Editor Install path -set IL2CPP_PATH=C:/Software/UnityEditor/Unity 2020.3.33f1c2/Editor/Data/il2cpp - -if not exist "%IL2CPP_PATH%" ( - echo "please set correct IL2CPP_PATH value" - goto EXIT -) - -set LOCAL_IL2CPP_DATA=LocalIl2CppData - -if not exist %LOCAL_IL2CPP_DATA% ( - mkdir %LOCAL_IL2CPP_DATA% -) - -rem need copdy MonoBleedingEdge -set MBE=%LOCAL_IL2CPP_DATA%\MonoBleedingEdge -if not exist %MBE% ( - xcopy /q /i /e "%IL2CPP_PATH%\..\MonoBleedingEdge" %MBE% -) - - -rem copy il2cpp -set IL2CPP=%LOCAL_IL2CPP_DATA%\il2cpp -if not exist %IL2CPP% ( - xcopy /q /i /e "%IL2CPP_PATH%" %IL2CPP% -) - -set HYBRIDCLR_REPO_DIR=hybridclr_repo - -set IL2CPP_PLUS_REPO_DIR=il2cpp_plus_repo - -set LIBIL2CPP_PATH=%LOCAL_IL2CPP_DATA%\il2cpp\libil2cpp -rd /s /q %LIBIL2CPP_PATH% - -xcopy /q /i /e %IL2CPP_PLUS_REPO_DIR%\libil2cpp %LIBIL2CPP_PATH% -xcopy /q /i /e %HYBRIDCLR_REPO_DIR%\hybridclr %LIBIL2CPP_PATH%\hybridclr - -rem clean il2cpp build cache -set IL2CPP_CACHE=..\Library\Il2cppBuildCache -echo clean %IL2CPP_CACHE% -if exist "%IL2CPP_CACHE%" rd /s /q "%IL2CPP_CACHE%" - -echo success - -:EXIT - -PAUSE \ No newline at end of file diff --git a/Packages/manifest.json b/Packages/manifest.json index 2227a53d..fdd050c9 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,6 +1,6 @@ { "dependencies": { - "com.focus-creative-games.hybridclr_unity": "0.8.0", + "com.focus-creative-games.hybridclr_unity": "https://gitee.com/focus-creative-games/hybridclr_unity.git", "com.unity.collab-proxy": "1.15.15", "com.unity.ide.rider": "2.0.7", "com.unity.ide.visualstudio": "2.0.14", @@ -50,4 +50,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 65a6f95d..34c61970 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,11 +1,11 @@ { "dependencies": { "com.focus-creative-games.hybridclr_unity": { - "version": "0.8.0", + "version": "https://gitee.com/focus-creative-games/hybridclr_unity.git", "depth": 0, - "source": "registry", + "source": "git", "dependencies": {}, - "url": "https://package.openupm.cn" + "hash": "bf6ae99dadfbc64e3a6f2dc7f63509a5b6b12621" }, "com.unity.collab-proxy": { "version": "1.15.15", diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 07776bfd..cf2227ab 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -5,10 +5,7 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - - enabled: 0 - path: Assets/TEngine.Demo/Demo/TEngine.EntityDemo/EntityDemo.unity - guid: 0abe20efc865c3e42b6b80e541d03354 - enabled: 1 - path: Assets/Scenes/DemoScene.unity - guid: 2cda990e2423bbf4892e6590ba056729 + path: Assets/Scenes/main.unity + guid: 07f693cf49a00634fbc050b96052bebd m_configObjects: {} diff --git a/ProjectSettings/HybridCLRSettings.asset b/ProjectSettings/HybridCLRSettings.asset new file mode 100644 index 00000000..e723c916 --- /dev/null +++ b/ProjectSettings/HybridCLRSettings.asset @@ -0,0 +1,32 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e189374413a3f00468e49d51d8b27a09, type: 3} + m_Name: + m_EditorClassIdentifier: + enable: 1 + useGlobalIl2cpp: 0 + hybridclrRepoURL: https://gitee.com/focus-creative-games/hybridclr + il2cppPlusRepoURL: https://gitee.com/focus-creative-games/il2cpp_plus + hotUpdateAssemblyDefinitions: + - {fileID: 5897886265953266890, guid: 7604e54d5e2c0f940b892d038911fd6a, type: 3} + hotUpdateAssemblies: + - Assembly-CSharp + preserveHotUpdateAssemblies: [] + hotUpdateDllCompileOutputRootDir: HybridCLRData/HotUpdateDlls + externalHotUpdateAssembliyDirs: [] + strippedAOTDllOutputRootDir: HybridCLRData/AssembliesPostIl2CppStrip + patchAOTAssemblies: [] + collectAssetReferenceTypes: 0 + outputLinkFile: HybridCLRData/Generated/link.xml + outputAOTGenericReferenceFile: HybridCLRData/Generated/AOTGenericReferences.cs + maxGenericReferenceIteration: 10 + maxMethodBridgeGenericIteration: 10 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index d450a44f..dafb0b6d 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 20 + serializedVersion: 22 productGUID: bb189644a16ef5749b99696b959dbbe0 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -55,6 +55,8 @@ PlayerSettings: m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 m_MTRendering: 1 + mipStripping: 0 + numberOfMipsStripped: 0 m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 @@ -72,6 +74,12 @@ PlayerSettings: androidRenderOutsideSafeArea: 1 androidUseSwappy: 0 androidBlitType: 0 + androidResizableWindow: 0 + androidDefaultWindowWidth: 1920 + androidDefaultWindowHeight: 1080 + androidMinimumWindowWidth: 400 + androidMinimumWindowHeight: 300 + androidFullscreenMode: 1 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 0 @@ -83,6 +91,11 @@ PlayerSettings: hideHomeButton: 0 submitAnalytics: 1 usePlayerLog: 1 + autoStreaming: 0 + useAnimationStreaming: 0 + useFontStreaming: 0 + autoStreamingId: + instantGameAppId: bakeCollisionMeshes: 0 forceSingleInstance: 0 useFlipModelSwapchain: 1 @@ -123,15 +136,16 @@ PlayerSettings: stadiaTargetFramerate: 0 vulkanNumSwapchainBuffers: 3 vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 0 vulkanEnableLateAcquireNextImage: 0 - useSecurityBuild: 0 + vulkanEnableCommandBufferRecycling: 1 m_SupportedAspectRatios: 4:3: 1 5:4: 1 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 1.0 + bundleVersion: 1.1 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -139,31 +153,6 @@ PlayerSettings: xboxOneDisableKinectGpuReservation: 1 xboxOneEnable7thCore: 1 vrSettings: - cardboard: - depthFormat: 0 - enableTransitionView: 0 - daydream: - depthFormat: 0 - useSustainedPerformanceMode: 0 - enableVideoLayer: 0 - useProtectedVideoMemory: 0 - minimumSupportedHeadTracking: 0 - maximumSupportedHeadTracking: 1 - hololens: - depthFormat: 1 - depthBufferSharingEnabled: 1 - lumin: - depthFormat: 0 - frameTiming: 2 - enableGLCache: 0 - glCacheMaxBlobSize: 524288 - glCacheMaxFileSize: 8388608 - oculus: - sharedDepthBuffer: 1 - dashSupport: 1 - lowOverheadMode: 0 - protectedContext: 0 - v2Signing: 1 enable360StereoCapture: 0 isWsaHolographicRemotingEnabled: 0 enableFrameTimingStats: 0 @@ -176,7 +165,11 @@ PlayerSettings: androidMaxAspectRatio: 2.1 applicationIdentifier: Standalone: com.TEngine.TEngineDemo - buildNumber: {} + buildNumber: + Standalone: 0 + iPhone: 0 + tvOS: 0 + overrideDefaultApplicationIdentifier: 1 AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 19 AndroidTargetSdkVersion: 0 @@ -193,10 +186,10 @@ PlayerSettings: StripUnusedMeshComponents: 0 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 10.0 + iOSTargetOSVersionString: 11.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 10.0 + tvOSTargetOSVersionString: 11.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 @@ -230,8 +223,8 @@ PlayerSettings: iOSLaunchScreeniPadFillPct: 100 iOSLaunchScreeniPadSize: 100 iOSLaunchScreeniPadCustomXibPath: - iOSUseLaunchScreenStoryboard: 0 iOSLaunchScreenCustomStoryboardPath: + iOSLaunchScreeniPadCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] iOSBackgroundModes: 0 @@ -239,6 +232,7 @@ PlayerSettings: metalEditorSupport: 1 metalAPIValidation: 1 iOSRenderExtraFrameOnPause: 0 + iosCopyPluginsCodeInsteadOfSymlink: 0 appleDeveloperTeamID: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: @@ -248,10 +242,19 @@ PlayerSettings: iOSRequireARKit: 0 iOSAutomaticallyDetectAndAddCapabilities: 1 appleEnableProMotion: 0 + shaderPrecisionModel: 0 clonedFromGUID: 00000000000000000000000000000000 templatePackageId: templateDefaultScene: + useCustomMainManifest: 0 + useCustomLauncherManifest: 0 + useCustomMainGradleTemplate: 0 + useCustomLauncherGradleManifest: 0 + useCustomBaseGradleTemplate: 0 + useCustomGradlePropertiesTemplate: 0 + useCustomProguardFile: 0 AndroidTargetArchitectures: 1 + AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} AndroidKeystoreName: @@ -268,15 +271,22 @@ PlayerSettings: height: 180 banner: {fileID: 0} androidGamepadSupportLevel: 0 + chromeosInputEmulation: 1 + AndroidMinifyWithR8: 0 + AndroidMinifyRelease: 0 + AndroidMinifyDebug: 0 AndroidValidateAppBundleSize: 1 AndroidAppBundleSizeToValidate: 150 m_BuildTargetIcons: [] m_BuildTargetPlatformIcons: [] m_BuildTargetBatching: [] - m_BuildTargetEncrypting: [] + m_BuildTargetSecurityBuild: [] m_BuildTargetGraphicsJobs: [] m_BuildTargetGraphicsJobMode: [] - m_BuildTargetGraphicsAPIs: [] + m_BuildTargetGraphicsAPIs: + - m_BuildTarget: iOSSupport + m_APIs: 10000000 + m_Automatic: 1 m_BuildTargetVRSettings: [] openGLRequireES31: 0 openGLRequireES31AEP: 0 @@ -288,6 +298,7 @@ PlayerSettings: tvOS: 1 m_BuildTargetGroupLightmapEncodingQuality: [] m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetNormalMapEncoding: [] playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -297,12 +308,15 @@ PlayerSettings: cameraUsageDescription: locationUsageDescription: microphoneUsageDescription: + bluetoothUsageDescription: + switchNMETAOverride: switchNetLibKey: switchSocketMemoryPoolSize: 6144 switchSocketAllocatorPoolSize: 128 switchSocketConcurrencyLimit: 14 switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 + switchUseGOLDLinker: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: switchTitleNames_0: @@ -320,6 +334,7 @@ PlayerSettings: switchTitleNames_12: switchTitleNames_13: switchTitleNames_14: + switchTitleNames_15: switchPublisherNames_0: switchPublisherNames_1: switchPublisherNames_2: @@ -335,6 +350,7 @@ PlayerSettings: switchPublisherNames_12: switchPublisherNames_13: switchPublisherNames_14: + switchPublisherNames_15: switchIcons_0: {fileID: 0} switchIcons_1: {fileID: 0} switchIcons_2: {fileID: 0} @@ -350,6 +366,7 @@ PlayerSettings: switchIcons_12: {fileID: 0} switchIcons_13: {fileID: 0} switchIcons_14: {fileID: 0} + switchIcons_15: {fileID: 0} switchSmallIcons_0: {fileID: 0} switchSmallIcons_1: {fileID: 0} switchSmallIcons_2: {fileID: 0} @@ -365,6 +382,7 @@ PlayerSettings: switchSmallIcons_12: {fileID: 0} switchSmallIcons_13: {fileID: 0} switchSmallIcons_14: {fileID: 0} + switchSmallIcons_15: {fileID: 0} switchManualHTML: switchAccessibleURLs: switchLegalInformation: @@ -427,6 +445,11 @@ PlayerSettings: switchSocketInitializeEnabled: 1 switchNetworkInterfaceManagerInitializeEnabled: 1 switchPlayerConnectionEnabled: 1 + switchUseNewStyleFilepaths: 0 + switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 + switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: @@ -497,6 +520,7 @@ PlayerSettings: ps4videoRecordingFeaturesUsed: 0 ps4contentSearchFeaturesUsed: 0 ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 ps4GPU800MHz: 1 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] @@ -517,23 +541,35 @@ PlayerSettings: webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 webGLCompressionFormat: 0 + webGLWasmArithmeticExceptions: 0 webGLLinkerTarget: 1 webGLThreadsSupport: 0 - webGLWasmStreaming: 0 + webGLDecompressionFallback: 0 scriptingDefineSymbols: - 1: ENABLE_LOG_WARNING;ENABLE_LOG_ERROR;ENABLE_LOG_EXCEPTION + 1: ENABLE_LOG;ENABLE_LOG_WARNING;ENABLE_LOG_ERROR;ENABLE_LOG_EXCEPTION;ENABLE_MONO;HOT_FIX;RELEASE_BUILD;ASSETBUNDLE_ENABLE + 4: ENABLE_LOG + 7: ENABLE_LOG + 13: ENABLE_LOG + 14: ENABLE_LOG + additionalCompilerArguments: {} platformArchitecture: {} - scriptingBackend: {} + scriptingBackend: + Standalone: 1 il2cppCompilerConfiguration: {} managedStrippingLevel: {} incrementalIl2cppBuild: {} + suppressCommonWarnings: 1 allowUnsafeCode: 0 + useDeterministicCompilation: 1 + useReferenceAssemblies: 1 + enableRoslynAnalyzers: 1 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 0 + assemblyVersionValidation: 1 gcWBarrierValidation: 0 apiCompatibilityLevelPerPlatform: - Standalone: 6 + Standalone: 3 m_RenderingPath: 1 m_MobileRenderingPath: 1 metroPackageName: TEngine @@ -563,6 +599,7 @@ PlayerSettings: metroFTAName: metroFTAFileTypes: [] metroProtocolName: + vcxProjDefaultLanguage: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -581,6 +618,7 @@ PlayerSettings: XboxOneCapability: [] XboxOneGameRating: {} XboxOneIsContentPackage: 0 + XboxOneEnhancedXboxCompatibilityMode: 0 XboxOneEnableGPUVariability: 1 XboxOneSockets: {} XboxOneSplashScreen: {fileID: 0} @@ -589,10 +627,7 @@ PlayerSettings: XboxOneXTitleMemory: 8 XboxOneOverrideIdentityName: XboxOneOverrideIdentityPublisher: - vrEditorSettings: - daydream: - daydreamIconForeground: {fileID: 0} - daydreamIconBackground: {fileID: 0} + vrEditorSettings: {} cloudServicesEnabled: {} luminIcon: m_Name: @@ -606,11 +641,18 @@ PlayerSettings: m_VersionCode: 1 m_VersionName: apiCompatibilityLevel: 6 + activeInputHandler: 0 cloudProjectId: framebufferDepthMemorylessMode: 0 + qualitySettingsNames: + - Very Low + - Low + - Medium + - High + - Very High + - Ultra projectName: organizationId: cloudEnabled: 0 - enableNativePlatformBackendsForNewInputSystem: 0 - disableOldInputManagerSupport: 0 legacyClampBlendShapeWeights: 0 + virtualTexturingSupportEnabled: 0 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index c23e52d6..0d75d0ef 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -4,7 +4,7 @@ QualitySettings: m_ObjectHideFlags: 0 serializedVersion: 5 - m_CurrentQuality: 5 + m_CurrentQuality: 0 m_QualitySettings: - serializedVersion: 2 name: Very Low diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset new file mode 100644 index 00000000..c30c7f77 --- /dev/null +++ b/UserSettings/EditorUserSettings.asset @@ -0,0 +1,39 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!162 &1 +EditorUserSettings: + m_ObjectHideFlags: 0 + serializedVersion: 4 + m_ConfigSettings: + RecentlyUsedScenePath-0: + value: 224247031146467a2c3a0931046c70121c121b3e182d352462061f39e7e3200ce7f422a7f234362820 + flags: 0 + RecentlyUsedScenePath-1: + value: 224247031146466f28000b2b1e261134131a1765082d2b3f621d383de5e93a3dacd21fcde23730730c2bcb3909314f2afc031d12 + flags: 0 + RecentlyUsedScenePath-2: + value: 22424703114646680e0b0227036c7b151b182b292926237e38271427fb + flags: 0 + RecentlyUsedScenePath-3: + value: 224247031146466f3f0b1f2d05315c1505582b2929670a621e2a183de7ae2136ebf32f + flags: 0 + RecentlyUsedScenePath-4: + value: 224247031146466f3f0b1f2d05315c1505582b292926232362054f00e1e53a3dacf238e0f323 + flags: 0 + RecentlyUsedScenePath-5: + value: 22424703114646680e0b0227036c52111f19563f22213229 + flags: 0 + vcSharedLogLevel: + value: 0d5e400f0650 + flags: 0 + m_VCAutomaticAdd: 1 + m_VCDebugCom: 0 + m_VCDebugCmd: 0 + m_VCDebugOut: 0 + m_SemanticMergeMode: 2 + m_VCShowFailedCheckout: 1 + m_VCOverwriteFailedCheckoutAssets: 1 + m_VCProjectOverlayIcons: 1 + m_VCHierarchyOverlayIcons: 1 + m_VCOtherOverlayIcons: 1 + m_VCAllowAsyncUpdate: 1