diff --git a/Assets/Assets/Prefab/Particles/Environment/Crystal effect green.prefab b/Assets/Assets/Prefab/Particles/Environment/Crystal effect green.prefab index f2f847a..d76e8dd 100644 --- a/Assets/Assets/Prefab/Particles/Environment/Crystal effect green.prefab +++ b/Assets/Assets/Prefab/Particles/Environment/Crystal effect green.prefab @@ -4844,6 +4844,11 @@ ParticleSystemRenderer: m_ReflectionProbeUsage: 0 m_RayTracingMode: 0 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -4865,6 +4870,7 @@ ParticleSystemRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 @@ -9690,6 +9696,11 @@ ParticleSystemRenderer: m_ReflectionProbeUsage: 0 m_RayTracingMode: 0 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -9711,6 +9722,7 @@ ParticleSystemRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 @@ -14527,6 +14539,11 @@ ParticleSystemRenderer: m_ReflectionProbeUsage: 0 m_RayTracingMode: 0 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -14548,6 +14565,7 @@ ParticleSystemRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 @@ -14762,7 +14780,7 @@ ParticleSystem: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -14771,7 +14789,7 @@ ParticleSystem: outWeight: 0.33333334 - serializedVersion: 3 time: 1 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -15463,7 +15481,7 @@ ParticleSystem: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -15472,7 +15490,7 @@ ParticleSystem: outWeight: 0.33333334 - serializedVersion: 3 time: 1 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -15578,8 +15596,8 @@ ParticleSystem: outSlope: 0 tangentMode: 0 weightedMode: 0 - inWeight: 0 - outWeight: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 - serializedVersion: 3 time: 1 value: 1 @@ -15587,8 +15605,8 @@ ParticleSystem: outSlope: 0 tangentMode: 0 weightedMode: 0 - inWeight: 0 - outWeight: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -15602,8 +15620,8 @@ ParticleSystem: outSlope: 0 tangentMode: 0 weightedMode: 0 - inWeight: 0 - outWeight: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 - serializedVersion: 3 time: 1 value: 1 @@ -15611,8 +15629,8 @@ ParticleSystem: outSlope: 0 tangentMode: 0 weightedMode: 0 - inWeight: 0 - outWeight: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -15846,7 +15864,7 @@ ParticleSystem: m_Curve: - serializedVersion: 3 time: 0 - value: 0 + value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -15855,7 +15873,7 @@ ParticleSystem: outWeight: 0.33333334 - serializedVersion: 3 time: 1 - value: 0 + value: 1 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -15899,7 +15917,7 @@ ParticleSystem: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -15908,7 +15926,7 @@ ParticleSystem: outWeight: 0.33333334 - serializedVersion: 3 time: 1 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -19418,6 +19436,11 @@ ParticleSystemRenderer: m_ReflectionProbeUsage: 0 m_RayTracingMode: 0 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -19439,6 +19462,7 @@ ParticleSystemRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 diff --git a/Assets/Convention b/Assets/Convention index fd68071..7719e77 160000 --- a/Assets/Convention +++ b/Assets/Convention @@ -1 +1 @@ -Subproject commit fd68071416663ae852495245c8a5f49b70f4a7f0 +Subproject commit 7719e77b77c719718dd0f098a3ddd1373e97c870 diff --git a/Assets/Scripts/Framework/GameContent/GameController.cs b/Assets/Scripts/Framework/GameContent/GameController.cs index 612dea9..931a7cf 100644 --- a/Assets/Scripts/Framework/GameContent/GameController.cs +++ b/Assets/Scripts/Framework/GameContent/GameController.cs @@ -52,8 +52,11 @@ namespace Demo.Game [Header("Environment")] [Resources] public Transform GlobalLight; + private bool IsGameLoading = false; + public IEnumerator GameInit() { + IsGameLoading = true; float gameInitStartTime = Time.realtimeSinceStartup; try { @@ -230,27 +233,7 @@ namespace Demo.Game rootGameObject.SetContent("SongLength", MainAudio.CurrentClip.length); if (isRecompile || true) { - static IEnumerator Foo(IEnumerator ir) - { - Stack loadingTask = new(); - loadingTask.Push(ir); - while (loadingTask.Count > 0) - { - if (loadingTask.Peek().MoveNext()) - { - if (loadingTask.Peek().Current is IEnumerator next) - loadingTask.Push(next); - else if (loadingTask.Peek().Current is ScriptableObject) - yield return null; - } - else - { - loadingTask.Pop(); - } - } - yield break; - } - yield return ConventionUtility.AvoidFakeStop(rootGameObject.ParseFromScriptFile2Expr(rootObject));//Foo(rootGameObject.ParseFromScriptFile2Expr(rootObject)); + yield return ConventionUtility.AvoidFakeStop(rootGameObject.ParseFromScriptFile2Expr(rootObject)); int applyDownCount = 0; void NDFS(ScriptableObject current) { @@ -324,6 +307,7 @@ namespace Demo.Game MainConfig.SaveProperties(); float gameInitEndTime = Time.realtimeSinceStartup; float gameInitElapsed = (gameInitEndTime - gameInitStartTime) * 1000f; + IsGameLoading = false; Debug.Log($"[GameInit] 总耗时: {gameInitElapsed:F2} ms", this); } } @@ -340,7 +324,8 @@ namespace Demo.Game { yield return null; IsEnableUpdate = true; - yield return new WaitUntil(() => MainObject != null); + yield return new WaitUntil(() => MainObject != null && IsGameLoading == false); + yield return null; MainObject.ScriptUpdate(SongOffset, Time.deltaTime, ScriptableObject.TickType.Reset); } diff --git a/Assets/Scripts/Framework/ScriptableObjectInstantiate/DefaultScriptableObjectInstantiate.cs b/Assets/Scripts/Framework/ScriptableObjectInstantiate/DefaultScriptableObjectInstantiate.cs index d159f5d..ff83ada 100644 --- a/Assets/Scripts/Framework/ScriptableObjectInstantiate/DefaultScriptableObjectInstantiate.cs +++ b/Assets/Scripts/Framework/ScriptableObjectInstantiate/DefaultScriptableObjectInstantiate.cs @@ -194,20 +194,20 @@ namespace Demo public RScriptVariables GenerateVariables(ScriptableObject self) { RScriptVariables variables = new() - { - { "this", new() { data = self, type = self.GetType() } }, - { "self", new() { data = self, type = self.GetType() } }, - { "console", new() { data = new ConsoleTool(gameObject), type = typeof(ConsoleTool) } }, - { nameof(MathExtension.EaseCurveType), new() { data = EaseCurveTypeInstance.instance, type = typeof(EaseCurveTypeInstance) } }, - { $"Spline{nameof(SplineComputer.SampleMode)}", - new() { data = SplineComputerSampleModeInstance.instance, type = typeof(SplineComputerSampleModeInstance)} }, - { $"Spline{nameof(Spline.Type)}", - new() { data = SplineTypeInstance.instance, type = typeof(SplineTypeInstance)} }, - { nameof(IEffectHookObject.InteractiveEffectType), - new() { data = IEffectHookObjectInstance.instance, type = typeof(IEffectHookObjectInstance)} }, - { nameof(IInteraction.JudgementLevel), - new() { data = IInteractionJudgementLevelInstance.instance, type = typeof(IInteractionJudgementLevelInstance) } } - }; + { + { "this", new() { data = self, type = self.GetType() } }, + { "self", new() { data = self, type = self.GetType() } }, + { "console", new() { data = new ConsoleTool(gameObject), type = typeof(ConsoleTool) } }, + { nameof(MathExtension.EaseCurveType), new() { data = EaseCurveTypeInstance.instance, type = typeof(EaseCurveTypeInstance) } }, + { $"Spline{nameof(SplineComputer.SampleMode)}", + new() { data = SplineComputerSampleModeInstance.instance, type = typeof(SplineComputerSampleModeInstance)} }, + { $"Spline{nameof(Spline.Type)}", + new() { data = SplineTypeInstance.instance, type = typeof(SplineTypeInstance)} }, + { nameof(IEffectHookObject.InteractiveEffectType), + new() { data = IEffectHookObjectInstance.instance, type = typeof(IEffectHookObjectInstance)} }, + { nameof(IInteraction.JudgementLevel), + new() { data = IInteractionJudgementLevelInstance.instance, type = typeof(IInteractionJudgementLevelInstance) } } + }; return variables; } diff --git a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset index a0303ed..89eb162 100644 --- a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset +++ b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset @@ -63,19 +63,7 @@ MonoBehaviour: - rid: 4324738240734560283 - rid: 4324738240734560284 m_RuntimeSettings: - m_List: - - rid: 4324738240734560258 - - rid: 4324738240734560260 - - rid: 4324738240734560262 - - rid: 4324738240734560264 - - rid: 4324738240734560267 - - rid: 4324738240734560268 - - rid: 4324738240734560269 - - rid: 4324738240734560275 - - rid: 4324738240734560276 - - rid: 4324738240734560280 - - rid: 4324738240734560281 - - rid: 4324738240734560282 + m_List: [] m_AssetVersion: 8 m_ObsoleteDefaultVolumeProfile: {fileID: 0} m_RenderingLayerNames: @@ -207,7 +195,7 @@ MonoBehaviour: type: {class: RenderGraphSettings, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_Version: 0 - m_EnableRenderCompatibilityMode: 0 + m_EnableRenderCompatibilityMode: 1 - rid: 4324738240734560265 type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: