优化,改bug

Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
2026-07-09 23:25:02 +08:00
parent 879f1e49b8
commit fdc20cd66f
54 changed files with 288754 additions and 4266 deletions

7
Assets/Assets.sln.meta Normal file
View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 28802a2f6f0ff2942bd2a248b9b68960
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 88f0993afef43b34eb23a79fbdd94e9b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -55,6 +55,10 @@ namespace Ichni.Editor
targetElement.connectedTab = this;
this.isExpanded = false;
this.isSelected = false;
if (BgImage != null)
{
BgImage.color = new Color(0.5f, 0.5f, 0.5f, 0);
}
this.childTabList = new List<HierarchyTab>();
// 清除旧的缩进线

View File

@@ -25,7 +25,7 @@ namespace Ichni.Editor
this.parameterName = parameterName;
unitList = new List<DynamicUICompositeUnit>();
InitializeWindow(titleText, ApplyParameters);
InitializeWindow(titleText, () => ApplyParameters?.Invoke());
}

View File

@@ -58,6 +58,19 @@ namespace Ichni.RhythmGame
public Action PasteAction = null;
private void PasteTrackList()
{
if (parentElement is not ElementFolder folder)
{
LogWindow.Log("Paste Track List failed: parent element is not an ElementFolder.", Color.yellow);
return;
}
List<Track> trackList = folder.trackList;
if (trackList == null || trackList.Count == 0)
{
LogWindow.Log("Paste Track List failed: no tracks found in parent folder.", Color.yellow);
return;
}
if (PasteAction == null)
{
PasteAction = () =>
@@ -65,12 +78,19 @@ namespace Ichni.RhythmGame
PasteTrackList();
};
}
List<Track> trackList = (parentElement as ElementFolder).trackList;
trackSwitch = new FlexibleInt();
trackPercent = new FlexibleFloat();
foreach (Track track in trackList)
{
if (track == null) continue;
TrackTimeSubmoduleMovable trackTimeSubmodule = track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
if (trackTimeSubmodule == null)
{
LogWindow.Log("Paste Track List skipped a track without movable time submodule.", Color.yellow);
continue;
}
trackSwitch.animations.Add(new AnimatedInt(trackTimeSubmodule.trackStartTime,
trackList.IndexOf(track)));
trackPercent.animations.Add(new AnimatedFloat(trackTimeSubmodule.trackStartTime,

View File

@@ -205,6 +205,7 @@ namespace Ichni.RhythmGame
{
if (nowEffectState == EffectState.Before)
{
PostProcessingManager.EnsureActiveCameraPostProcessing();
PreExecute();
}

View File

@@ -1,4 +1,5 @@
using Ichni.RhythmGame.Beatmap;
using SLSUtilities.Rendering.PostProcessing;
using UnityEngine;
using UnityEngine.Rendering.Universal;
@@ -10,7 +11,7 @@ namespace Ichni.RhythmGame
public float peak;
public AnimationCurve intensityCurve;
private Bloom _bloom;
private AnimeBloom _bloom;
#endregion
#region [] Generation & Initialization
@@ -36,6 +37,7 @@ namespace Ichni.RhythmGame
if (_bloom == null && PostProcessingManager.GlobalVolume != null)
{
PostProcessingManager.GlobalVolume.profile.TryGet(out _bloom);
}
}
#endregion

View File

@@ -25,6 +25,9 @@ namespace Ichni.Editor
public void AddSelectElement(GameElement gameElement)
{
if (gameElement == null || gameElement.connectedTab == null) return;
if (currentSelectedElements.Contains(gameElement)) return;
currentSelectedElements.Add(gameElement);
gameElement.connectedTab.isSelected = true;
@@ -36,8 +39,12 @@ namespace Ichni.Editor
public void RemoveSelectElement(GameElement gameElement)
{
if (gameElement == null) return;
currentSelectedElements.Remove(gameElement);
if (gameElement.connectedTab == null) return;
gameElement.connectedTab.isSelected = false;
if (gameElement.connectedTab.BgImage != null)
{
@@ -47,6 +54,7 @@ namespace Ichni.Editor
public void ClearSelectedElements()
{
currentSelectedElements.RemoveAll(gameElement => gameElement == null);
currentSelectedElements.ForEach(gameElement =>
{
if (gameElement == null || gameElement.connectedTab == null) return;
@@ -108,12 +116,24 @@ namespace Ichni.Editor
public void CopyElement(GameElement gameElement)
{
if (gameElement == null)
{
LogWindow.Log("No element selected to copy.", Color.red);
return;
}
LogWindow.Log("Copied element: " + gameElement.elementName);
copiedElement = gameElement;
}
public void PasteElement(GameElement parentElement)
{
if (parentElement == null)
{
LogWindow.Log("No parent element selected to paste.", Color.red);
return;
}
if (copiedElement == null)
{
LogWindow.Log("No element copied.");
@@ -128,6 +148,7 @@ namespace Ichni.Editor
// 与 EditorManager.LoadProject 的加载后流程对齐,确保 Manager 注册等关键步骤不遗漏。
foreach (GameElement pasted in pastedElementList)
{
if (pasted == null) continue;
pasted.AfterInitialize();
pasted.Refresh();
}
@@ -135,6 +156,12 @@ namespace Ichni.Editor
public void DeleteElement(GameElement gameElement)
{
if (gameElement == null)
{
LogWindow.Log("No element selected to delete.", Color.red);
return;
}
LogWindow.Log("Deleted element: " + gameElement.elementName + " and all its children.");
if (gameElement.parentElement != null)
@@ -144,6 +171,7 @@ namespace Ichni.Editor
gameElement.parentElement.connectedTab.SetStatus();
}
EditorManager.instance.operationManager.RemoveSelectElement(gameElement);
gameElement.Delete();
EditorManager.instance.uiManager.inspector.ClearInspector();
}
@@ -156,15 +184,36 @@ namespace Ichni.Editor
/// <returns></returns>
private void AffiliatedPaste(GameElement gameElement, GameElement parent)
{
if (gameElement == null || parent == null) return;
gameElement.SaveBM();
GameElement pastedElement = (gameElement.matchedBM as GameElement_BM).DuplicateBM(parent);
if (gameElement.matchedBM is not GameElement_BM gameElementBM)
{
LogWindow.Log("Paste failed: " + gameElement.elementName + " did not create a valid BM.", Color.red);
return;
}
GameElement pastedElement = gameElementBM.DuplicateBM(parent);
if (pastedElement == null)
{
LogWindow.Log("Paste failed: " + gameElement.elementName + " could not be duplicated.", Color.red);
return;
}
pastedElementList.Add(pastedElement);
gameElement.submoduleList.ForEach(submodule =>
{
if (submodule == null) return;
Debug.Log(submodule.GetType() + " is pasted.");
submodule.SaveBM();
try { (submodule.matchedBM as Submodule_BM).DuplicateBM(pastedElement); }
if (submodule.matchedBM is not Submodule_BM submoduleBM) return;
SubmoduleBase existingSubmodule = pastedElement.submoduleList
.FirstOrDefault(pastedSubmodule => pastedSubmodule != null && pastedSubmodule.GetType() == submodule.GetType());
existingSubmodule?.Delete();
try { submoduleBM.DuplicateBM(pastedElement); }
catch { Debug.LogWarning("Submodule paste error: " + submodule.GetType()); }
});

View File

@@ -17,5 +17,16 @@ namespace Ichni
[ShowInInspector, SerializeField]
private Volume globalVolume;
public static void EnsureActiveCameraPostProcessing()
{
Camera camera = EditorManager.instance?.cameraManager?.currentCamera;
if (camera == null) return;
UniversalAdditionalCameraData cameraData = camera.GetComponent<UniversalAdditionalCameraData>();
if (cameraData == null) return;
cameraData.renderPostProcessing = true;
}
}
}

View File

@@ -53,7 +53,7 @@ MonoBehaviour:
m_AdditionalLightsShadowResolutionTierHigh: 512
m_ReflectionProbeBlending: 0
m_ReflectionProbeBoxProjection: 0
m_ReflectionProbeAtlas: 1
m_ReflectionProbeAtlas: 0
m_ShadowDistance: 50
m_ShadowCascadeCount: 1
m_Cascade2Split: 0.25

View File

@@ -52,25 +52,22 @@ namespace SLSUtilities.Rendering.PostProcessing
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
{
if (renderingData.cameraData.postProcessEnabled)
if (afterTransparentPass.Setup(ref renderingData))
{
if (afterTransparentPass.Setup(ref renderingData))
{
afterTransparentPass.ConfigureInput(ScriptableRenderPassInput.Color);
renderer.EnqueuePass(afterTransparentPass);
}
afterTransparentPass.ConfigureInput(ScriptableRenderPassInput.Color);
renderer.EnqueuePass(afterTransparentPass);
}
if (beforePostProcessPass.Setup(ref renderingData))
{
beforePostProcessPass.ConfigureInput(ScriptableRenderPassInput.Color);
renderer.EnqueuePass(beforePostProcessPass);
}
if (beforePostProcessPass.Setup(ref renderingData))
{
beforePostProcessPass.ConfigureInput(ScriptableRenderPassInput.Color);
renderer.EnqueuePass(beforePostProcessPass);
}
if (afterPostProcessPass.Setup(ref renderingData))
{
afterPostProcessPass.ConfigureInput(ScriptableRenderPassInput.Color);
renderer.EnqueuePass(afterPostProcessPass);
}
if (afterPostProcessPass.Setup(ref renderingData))
{
afterPostProcessPass.ConfigureInput(ScriptableRenderPassInput.Color);
renderer.EnqueuePass(afterPostProcessPass);
}
}

View File

@@ -7,7 +7,9 @@ using UnityEngine.Rendering.Universal;
namespace SLSUtilities.Rendering.PostProcessing
{
[Serializable, VolumeComponentMenu("SLS/Postprocessing/Pixelate")]
[Serializable]
[VolumeComponentMenu("SLS/Postprocessing/Pixelate")]
[SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
public class PixelateVolume : ScriptablePostProcessorVolume
{
public override CustomPostProcessInjectionPoint InjectionPoint => CustomPostProcessInjectionPoint.AfterPostProcess;

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 260bd4ea5a2bfb64fa5cd109b51c16c0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: da9634960a9055f47a1c188aa9509d23
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,13 @@
{
"CommandScripts" : {
"__type" : "Ichni.RhythmGame.Beatmap.CommandScripts_BM,Assembly-CSharp",
"value" : {
"commandList" : [
],
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 70ebcc59518719c4e9a5ed52eec1c2a3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3a38cfeec55590a4fbd6113140b20221
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,23 @@
{
"ProjectInformation" : {
"__type" : "Ichni.RhythmGame.Beatmap.ProjectInformation_BM,Assembly-CSharp",
"value" : {
"projectName" : "Fate Of fear EZ",
"creatorName" : "Trader 神币",
"editorVersion" : "0.1.0",
"createTime" : "2025\/8\/13 17:33:51",
"lastSaveTime" : "2026\/7\/9 10:04:36",
"selectedThemeBundleList" : [
"basic","departure_to_multiverse"
],
"tagManager" : {
"tagMatchers" : [
]
},
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: de68bf3c58b12b8439a66e79205c2de2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
{
"SongInformation" : {
"__type" : "Ichni.RhythmGame.Beatmap.SongInformation_BM,Assembly-CSharp",
"value" : {
"songName" : "Fate Of Fear.mp3",
"bpm" : 180,
"delay" : 0,
"offset" : 0,
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 839b9d472dc4de4418ae43a8b88a459d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
"creatorName" : "小优!!!!",
"editorVersion" : "0.1.0",
"createTime" : "2026\/6\/14 14:50:34",
"lastSaveTime" : "2026\/7\/1 23:10:08",
"lastSaveTime" : "2026\/7\/8 15:33:09",
"selectedThemeBundleList" : [
"basic","departure_to_multiverse"
],

View File

@@ -5,7 +5,7 @@
"songName" : "Space Rain.wav",
"bpm" : 181.818,
"delay" : 0,
"offset" : 0,
"offset" : -0.03,
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1cde48521dfd60843a741be6492c3f72
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5ef29acca12475d45b21f77c37044f67
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8cda5057162133543b13f27dd0aa7d56
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,13 @@
{
"CommandScripts" : {
"__type" : "Ichni.RhythmGame.Beatmap.CommandScripts_BM,Assembly-CSharp",
"value" : {
"commandList" : [
],
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3f43f4d47c136364ea24a8d5da8de419
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e85b14954ab97324eb12f3a55245988e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b905a2a5e91cc184fa3fb9141472f808
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,13 @@
{
"CommandScripts" : {
"__type" : "Ichni.RhythmGame.Beatmap.CommandScripts_BM,Assembly-CSharp",
"value" : {
"commandList" : [
],
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 718c9391249ac0446b37d625e4d33ab6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 12c16797316327447a763b1063627136
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
{
"ProjectInformation" : {
"__type" : "Ichni.RhythmGame.Beatmap.ProjectInformation_BM,Assembly-CSharp",
"value" : {
"projectName" : "LWS2",
"creatorName" : "M0ra",
"editorVersion" : "0.1.0",
"createTime" : "2025\/8\/15 18:15:25",
"lastSaveTime" : "2025\/8\/15 18:15:25",
"selectedThemeBundleList" : [
"basic","departure_to_multiverse"
],
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 602565f369ec30e40a89e41a31b7fed6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
{
"SongInformation" : {
"__type" : "Ichni.RhythmGame.Beatmap.SongInformation_BM,Assembly-CSharp",
"value" : {
"songName" : "LWS2 - SHENG.wav",
"bpm" : 170,
"delay" : 1.412,
"offset" : 0,
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3efb6240a36bb0d4fa31e8dd99c4e860
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,23 @@
{
"ProjectInformation" : {
"__type" : "Ichni.RhythmGame.Beatmap.ProjectInformation_BM,Assembly-CSharp",
"value" : {
"projectName" : "world for white",
"creatorName" : "0",
"editorVersion" : "0.1.0",
"createTime" : "2025\/7\/13 15:38:18",
"lastSaveTime" : "2026\/7\/9 10:15:09",
"selectedThemeBundleList" : [
"basic","departure_to_multiverse"
],
"tagManager" : {
"tagMatchers" : [
]
},
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7af353ffb366759418244e9fd95f8d61
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
{
"SongInformation" : {
"__type" : "Ichni.RhythmGame.Beatmap.SongInformation_BM,Assembly-CSharp",
"value" : {
"songName" : "world for white.mp3",
"bpm" : 184,
"delay" : 0,
"offset" : 0,
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dd6d40a2ee4eea9469a489fab17da3a0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 07d4b9f770e67a64d9cca341f9187490
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a54278000d971ce48a6525e98590242f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -96,7 +96,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public override void FirstSetUpObject(bool isFirstGenerated)
{
if (trailParticleSystem == null)
trailParticleSystem = GetComponent<ParticleSystem>();
trailParticleSystem = GetComponentInChildren<ParticleSystem>();
particleRenderer = trailParticleSystem != null
? trailParticleSystem.GetComponent<ParticleSystemRenderer>()
@@ -135,8 +135,14 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
/// </summary>
public void ApplyParticleSettings()
{
if (trailParticleSystem == null)
trailParticleSystem = GetComponentInChildren<ParticleSystem>();
if (trailParticleSystem == null) return;
if (particleRenderer == null)
particleRenderer = trailParticleSystem.GetComponent<ParticleSystemRenderer>();
float safeLifetime = Mathf.Max(particleLifetime, MinLifetime);
int safeCount = Mathf.Max(particleCount, 0);