This commit is contained in:
2026-05-02 21:08:13 +08:00
parent e02c7f5e89
commit 91bc3a269b
27 changed files with 212553 additions and 18619 deletions

View File

@@ -26,9 +26,9 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("DTMGlobalFog");
var subcontainer = container.GenerateSubcontainer(3);
var subcontainer = container.GenerateSubcontainer(2);
inspector.GenerateInputField(this, subcontainer, "Fog Intensity", nameof(fogIntensity)).AddListenerFunction(UpdateFogProperties);
inspector.GenerateSlider(this, subcontainer, "Fog Intensity", nameof(fogIntensity), min: 0, max: 5).AddListenerFunction(UpdateFogProperties);
var colorStartContainer = container.GenerateSubcontainer(1, 240);
inspector.GenerateEmissionColorPicker(this, colorStartContainer, "Fog Color Start", "NULL", nameof(fogColorStart), nameof(fogColorStartIntensity))
@@ -38,14 +38,14 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
inspector.GenerateEmissionColorPicker(this, colorEndContainer, "Fog Color End", "NULL", nameof(fogColorEnd), nameof(fogColorEndIntensity))
.AddListenerFunction(UpdateFogProperties);
inspector.GenerateInputField(this, subcontainer, "Fog Color Duo", nameof(fogColorDuo)).AddListenerFunction(UpdateFogProperties);
inspector.GenerateInputField(this, subcontainer, "Skybox Fog Intensity", nameof(skyboxFogIntensity)).AddListenerFunction(UpdateFogProperties);
inspector.GenerateInputField(this, subcontainer, "Skybox Fog Height", nameof(skyboxFogHeight)).AddListenerFunction(UpdateFogProperties);
inspector.GenerateInputField(this, subcontainer, "Skybox Fog Falloff", nameof(skyboxFogFalloff)).AddListenerFunction(UpdateFogProperties);
inspector.GenerateInputField(this, subcontainer, "Skybox Fog Offset", nameof(skyboxFogOffset)).AddListenerFunction(UpdateFogProperties);
inspector.GenerateSlider(this, subcontainer, "Fog Color Duo", nameof(fogColorDuo), min: 0, max: 1).AddListenerFunction(UpdateFogProperties);
inspector.GenerateSlider(this, subcontainer, "Skybox Fog Intensity", nameof(skyboxFogIntensity), min: 0, max: 5).AddListenerFunction(UpdateFogProperties);
inspector.GenerateSlider(this, subcontainer, "Skybox Fog Height", nameof(skyboxFogHeight), min: 0, max: 10).AddListenerFunction(UpdateFogProperties);
inspector.GenerateSlider(this, subcontainer, "Skybox Fog Falloff", nameof(skyboxFogFalloff), min: 0, max: 10).AddListenerFunction(UpdateFogProperties);
inspector.GenerateSlider(this, subcontainer, "Skybox Fog Offset", nameof(skyboxFogOffset), min: -10, max: 10).AddListenerFunction(UpdateFogProperties);
inspector.GenerateInputField(this, subcontainer, "Skybox Fog Bottom", nameof(skyboxFogBottom)).AddListenerFunction(UpdateFogProperties);
inspector.GenerateInputField(this, subcontainer, "Skybox Fog Fill", nameof(skyboxFogFill)).AddListenerFunction(UpdateFogProperties);
inspector.GenerateSlider(this, subcontainer, "Skybox Fog Bottom", nameof(skyboxFogBottom), min: -10, max: 10).AddListenerFunction(UpdateFogProperties);
inspector.GenerateSlider(this, subcontainer, "Skybox Fog Fill", nameof(skyboxFogFill), min: 0, max: 5).AddListenerFunction(UpdateFogProperties);
}
#endregion
}

View File

@@ -23,22 +23,22 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("DTMFramesFloor");
var subcontainer = container.GenerateSubcontainer(3);
var subcontainer = container.GenerateSubcontainer(2);
inspector.GenerateSlider(this, subcontainer, "Pattern Size X", nameof(patternSizeX), min: 0, max: 20).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Pattern Size Y", nameof(patternSizeY), min: 0, max: 20).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Grid Density", nameof(gridDensity), min: 0, max: 10).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Time Angle", nameof(timeAngle), min: 0, max: 6.28f).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Step A", nameof(stepA), min: 0, max: 1).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Step B", nameof(stepB), min: 0, max: 1).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Base Speed", nameof(baseSpeed), min: 0, max: 3).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Pattern Size X", nameof(patternSizeX)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Pattern Size Y", nameof(patternSizeY)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Grid Density", nameof(gridDensity)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Time Angle", nameof(timeAngle)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Step A", nameof(stepA)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Step B", nameof(stepB)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Base Speed", nameof(baseSpeed)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateToggle(this, subcontainer, "Enable Outer Border", nameof(enableOuterBorder)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateBaseColorPicker(this, subcontainer, "Outer Border Color", nameof(outerBorderColor)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Outer Border Width", nameof(outerBorderWidth)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Outer Border Width", nameof(outerBorderWidth), min: 0, max: 5).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Fade Far", nameof(fadeFar)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Fade Near", nameof(fadeNear)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Fade Far", nameof(fadeFar), min: 0, max: 500).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Fade Near", nameof(fadeNear), min: 0, max: 100).AddListenerFunction(UpdateMaterialProperties);
}
#endregion
}

View File

@@ -23,23 +23,23 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("DTMRandomGridTube");
var subcontainer = container.GenerateSubcontainer(3);
var subcontainer = container.GenerateSubcontainer(2);
inspector.GenerateInputField(this, subcontainer, "Pattern Size X", nameof(patternSizeX)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Pattern Size Y", nameof(patternSizeY)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Grid Density", nameof(gridDensity)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Time Angle", nameof(timeAngle)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Step A", nameof(stepA)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Step B", nameof(stepB)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Base Speed", nameof(baseSpeed)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Pattern Size X", nameof(patternSizeX), min: 0, max: 20).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Pattern Size Y", nameof(patternSizeY), min: 0, max: 20).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Grid Density", nameof(gridDensity), min: 0, max: 10).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Time Angle", nameof(timeAngle), min: 0, max: 6.28f).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Step A", nameof(stepA), min: 0, max: 1).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Step B", nameof(stepB), min: 0, max: 1).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Base Speed", nameof(baseSpeed), min: 0, max: 3).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Seam Rotation", nameof(seamRotation)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Seam Fade Width", nameof(seamFadeWidth)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Seam Fade Smoothness", nameof(seamFadeSmoothness)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Seam Rotation", nameof(seamRotation), min: -180, max: 180).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Seam Fade Width", nameof(seamFadeWidth), min: 0, max: 5).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Seam Fade Smoothness", nameof(seamFadeSmoothness), min: 0, max: 5).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Fade Far", nameof(fadeFar)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Fade Near", nameof(fadeNear)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateInputField(this, subcontainer, "Tube Radius", nameof(tubeRadius)).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Fade Far", nameof(fadeFar), min: 0, max: 500).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Fade Near", nameof(fadeNear), min: 0, max: 100).AddListenerFunction(UpdateMaterialProperties);
inspector.GenerateSlider(this, subcontainer, "Tube Radius", nameof(tubeRadius), min: 0, max: 50).AddListenerFunction(UpdateMaterialProperties);
}
#endregion
}

View File

@@ -42,11 +42,11 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
ew.SetAsFlexibleFloat();
});
var enableProcessTimeInputField =
inspector.GenerateInputField(this, subcontainer, "Enable Process Time", nameof(enableProcessTime));
var enableProcessTimeSlider =
inspector.GenerateSlider(this, subcontainer, "Enable Process Time", nameof(enableProcessTime), min: 0, max: 3);
var headSizeInputField =
inspector.GenerateInputField(this, subcontainer, "Head Size", nameof(headSize));
var headSizeSlider =
inspector.GenerateSlider(this, subcontainer, "Head Size", nameof(headSize), min: 0, max: 10);
var curveSettings = container.GenerateSubcontainer(3);
var widthCurveButton = inspector.GenerateButton(this, curveSettings, "Width Curve", () =>

View File

@@ -21,17 +21,17 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public Color skyColor = Color.blue;
[Ichni.Editor.DynamicUIEmissionColor("Horizon", Group = "DTMStarrySkybox - Sky")]
public Color horizon = Color.cyan;
[Ichni.Editor.DynamicUI("Horizon Strength", Group = "DTMStarrySkybox - Sky")]
[Ichni.Editor.DynamicUISlider("Horizon Strength", Group = "DTMStarrySkybox - Sky", Span = 2, Min = 0, Max = 5)]
public float horizonStrength = 2f;
[Ichni.Editor.DynamicUI("Horizon Sky Height", Group = "DTMStarrySkybox - Sky")]
[Ichni.Editor.DynamicUISlider("Horizon Sky Height", Group = "DTMStarrySkybox - Sky", Span = 2, Min = 0, Max = 2)]
public float horizonSkyHeight = 0.7f;
// --- Stars ---
[Ichni.Editor.DynamicUI("Use Star Map", Group = "DTMStarrySkybox - Stars")]
public bool useStarMap = true;
[Ichni.Editor.DynamicUI("Star Density", Group = "DTMStarrySkybox - Stars")]
[Ichni.Editor.DynamicUISlider("Star Density", Group = "DTMStarrySkybox - Stars", Span = 2, Min = 0, Max = 200)]
public float starDensity = 30f;
[Ichni.Editor.DynamicUI("Star Size", Group = "DTMStarrySkybox - Stars")]
[Ichni.Editor.DynamicUISlider("Star Size", Group = "DTMStarrySkybox - Stars", Span = 2, Min = 0, Max = 300)]
public float starSize = 75f;
[Ichni.Editor.DynamicUIEmissionColor("Star Color", Group = "DTMStarrySkybox - Stars")]
public Color starColor = Color.white;
@@ -45,27 +45,27 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public bool haveSun = false;
[Ichni.Editor.DynamicUI("Sun Mask Texture (Name)", Group = "DTMStarrySkybox - Sun", Span = 3)]
public string sunMaskTextureName = "None";
[Ichni.Editor.DynamicUI("Sun Mask Size", Group = "DTMStarrySkybox - Sun")]
[Ichni.Editor.DynamicUISlider("Sun Mask Size", Group = "DTMStarrySkybox - Sun", Span = 2, Min = 0, Max = 0.2f)]
public float sunMaskSize = 0.02f;
[Ichni.Editor.DynamicUI("Sun Mask Spherize", Group = "DTMStarrySkybox - Sun")]
[Ichni.Editor.DynamicUISlider("Sun Mask Spherize", Group = "DTMStarrySkybox - Sun", Span = 2, Min = 0, Max = 30)]
public float sunMaskSpherize = 13.2f;
[Ichni.Editor.DynamicUI("Sun Disc Size", Group = "DTMStarrySkybox - Sun")]
[Ichni.Editor.DynamicUISlider("Sun Disc Size", Group = "DTMStarrySkybox - Sun", Span = 2, Min = 0, Max = 5)]
public float sunDiscSize = 1f;
[Ichni.Editor.DynamicUIEmissionColor("Sun Color One", Group = "DTMStarrySkybox - Sun")]
public Color sunColorOne = Color.white;
[Ichni.Editor.DynamicUIEmissionColor("Sun Color Two", Group = "DTMStarrySkybox - Sun")]
public Color sunColorTwo = Color.white;
[Ichni.Editor.DynamicUI("Sun Gradient Strength", Group = "DTMStarrySkybox - Sun")]
[Ichni.Editor.DynamicUISlider("Sun Gradient Strength", Group = "DTMStarrySkybox - Sun", Span = 2, Min = 0, Max = 10)]
public float sunGradientStrength = 3.7f;
[Ichni.Editor.DynamicUI("Sun Gradient Height", Group = "DTMStarrySkybox - Sun")]
[Ichni.Editor.DynamicUISlider("Sun Gradient Height", Group = "DTMStarrySkybox - Sun", Span = 2, Min = 0, Max = 3)]
public float sunGradientHeight = 1.23f;
// --- Fog ---
[Ichni.Editor.DynamicUI("Fog Height", Group = "DTMStarrySkybox - Fog")]
[Ichni.Editor.DynamicUISlider("Fog Height", Group = "DTMStarrySkybox - Fog", Span = 2, Min = 0, Max = 5)]
public float fogHeight = 1f;
[Ichni.Editor.DynamicUI("Fog Power", Group = "DTMStarrySkybox - Fog")]
[Ichni.Editor.DynamicUISlider("Fog Power", Group = "DTMStarrySkybox - Fog", Span = 2, Min = 0, Max = 1)]
public float fogPower = 0.5f;
[Ichni.Editor.DynamicUI("Fog Contrast", Group = "DTMStarrySkybox - Fog")]
[Ichni.Editor.DynamicUISlider("Fog Contrast", Group = "DTMStarrySkybox - Fog", Span = 2, Min = 0, Max = 200)]
public float fogContrast = 40f;
#endregion
@@ -91,31 +91,31 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic)
.GetComponent<DTMStarrySkybox>();
skybox.skyColor = skyColor;
skybox.horizon = horizon;
skybox.horizonStrength = horizonStrength;
skybox.horizonSkyHeight = horizonSkyHeight;
skybox.skyColor = skyColor;
skybox.horizon = horizon;
skybox.horizonStrength = horizonStrength;
skybox.horizonSkyHeight = horizonSkyHeight;
skybox.useStarMap = useStarMap;
skybox.starDensity = starDensity;
skybox.starSize = starSize;
skybox.starColor = starColor;
skybox.useStarMap = useStarMap;
skybox.starDensity = starDensity;
skybox.starSize = starSize;
skybox.starColor = starColor;
skybox.preventStarsInFrontOfSun = preventStarsInFrontOfSun;
skybox.starMapTextureName = starMapTextureName;
skybox.starMapTextureName = starMapTextureName;
skybox.haveSun = haveSun;
skybox.sunMaskTextureName = sunMaskTextureName;
skybox.sunMaskSize = sunMaskSize;
skybox.sunMaskSpherize = sunMaskSpherize;
skybox.sunDiscSize = sunDiscSize;
skybox.sunColorOne = sunColorOne;
skybox.sunColorTwo = sunColorTwo;
skybox.sunGradientStrength = sunGradientStrength;
skybox.sunGradientHeight = sunGradientHeight;
skybox.haveSun = haveSun;
skybox.sunMaskTextureName = sunMaskTextureName;
skybox.sunMaskSize = sunMaskSize;
skybox.sunMaskSpherize = sunMaskSpherize;
skybox.sunDiscSize = sunDiscSize;
skybox.sunColorOne = sunColorOne;
skybox.sunColorTwo = sunColorTwo;
skybox.sunGradientStrength = sunGradientStrength;
skybox.sunGradientHeight = sunGradientHeight;
skybox.fogHeight = fogHeight;
skybox.fogPower = fogPower;
skybox.fogContrast = fogContrast;
skybox.fogHeight = fogHeight;
skybox.fogPower = fogPower;
skybox.fogContrast = fogContrast;
return skybox;
}
@@ -204,11 +204,11 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public override void Refresh()
{
base.Refresh();
// 加入自动材质同步网:所有的数值被 UI 工具如撤回系统或滚动输入修改时UI 均会默认调用 Refresh() 结束更改。
// 此时自动将最新参数一次性烘焙至天空盒,再也无需每个 Inspector 元件去手动 AddListener()
UpdateSkyboxProperties();
if (skyboxMaterial != null)
{
RenderSettings.skybox = skyboxMaterial;