This commit is contained in:
SoulliesOfficial
2026-05-02 07:36:34 -04:00
parent e02c7f5e89
commit d47f5ac4ab
144 changed files with 1209351 additions and 63850 deletions

View File

@@ -41,6 +41,8 @@ namespace Ichni.RhythmGame
animation.propertyValueB = propertyValueB;
animation.propertyValueA = propertyValueA;
if (isFirstGenerated) animation.AfterInitialize();
return animation;
}

View File

@@ -37,6 +37,8 @@ namespace Ichni.RhythmGame
animation.propertyName = propertyName;
animation.propertyValue = propertyValue;
if (isFirstGenerated) animation.AfterInitialize();
return animation;
}

View File

@@ -40,6 +40,8 @@ namespace Ichni.RhythmGame
animation.propertyValueY = propertyValueY;
animation.propertyValueZ = propertyValueZ;
if (isFirstGenerated) animation.AfterInitialize();
return animation;
}

View File

@@ -31,6 +31,7 @@ namespace Ichni.RhythmGame
substantialObject.objectName = objectName;
substantialObject.FirstSetUpObject(isFirstGenerated);
substantialObject.SetEditorSubmodules();
if (isFirstGenerated) substantialObject.AfterInitialize();
return substantialObject;
}

View File

@@ -56,6 +56,7 @@ namespace Ichni.RhythmGame
particleEmitter.materialName = materialName;
particleEmitter.particlesContainer.SetParticleMaterial(themeBundleName, materialName);
particleEmitter.SetParticleSettings(prewarm, simulationSpace, density, lifeTime, speed, radius, isAutoOrient, particleRotation, false);
if (isFirstGenerated) particleEmitter.AfterInitialize();
return particleEmitter;
}

View File

@@ -24,6 +24,7 @@ namespace Ichni.RhythmGame
.AddComponent<TimeEffectsCollection>();
timeEffectsCollection.Initialize(name, guid, tags, isFirstGenerated, parentElement);
timeEffectsCollection.time = time;
if (isFirstGenerated) timeEffectsCollection.AfterInitialize();
return timeEffectsCollection;
}

View File

@@ -65,6 +65,8 @@ namespace Ichni.RhythmGame
}
pathNode.SetEditorSubmodules();
if (isFirstGenerated) pathNode.AfterInitialize();
return pathNode;
}

View File

@@ -25,6 +25,8 @@ namespace Ichni.RhythmGame
folder.trackList.Add(track);
}
if (isFirstGenerated) track.AfterInitialize();
return track;
}

View File

@@ -38,6 +38,8 @@ namespace Ichni.RhythmGame
point.trackPositioner.motion.rotationOffset = Vector3.zero;
point.trackPositioner.motion.applyRotation = false;
if (isFirstGenerated) point.AfterInitialize();
return point;
}

View File

@@ -36,6 +36,12 @@ namespace Ichni.RhythmGame
head.motionEulerAngles = motionEulerAngles;
head.trackPositioner.motion.rotationOffset = motionEulerAngles;
if (isFirstGenerated)
{
head.AfterInitialize();
Debug.Log($"生成 TrackHeadPoint{head.elementName}ID: {head.elementGuid}");
}
return head;
}

View File

@@ -38,6 +38,8 @@ namespace Ichni.RhythmGame
point.trackPositioner.motion.rotationOffset = Vector3.zero;
point.trackPositioner.motion.applyRotation = false;
if (isFirstGenerated) point.AfterInitialize();
return point;
}

View File

@@ -78,9 +78,7 @@ namespace Ichni.RhythmGame
Material mat = ThemeBundleManager.instance.GetObject<Material>(materialThemeBundleName, materialName);
if (mat == null)
{
#if UNITY_EDITOR
mat = EditorManager.instance.basePrefabs.defaultTrackMaterial;
#endif
}
renderMaterial = mat;
meshRenderer.material = renderMaterial;
@@ -94,7 +92,7 @@ namespace Ichni.RhythmGame
if (!string.IsNullOrEmpty(customTextureName) && customTextureName != "None")
{
if (renderMaterial != null && (renderMaterial.name.Contains("DefaultTrackMaterial") || renderMaterial.shader.name == "Soullies/TrackShader" || renderMaterial.shader.name == "TrackShader"))
if (renderMaterial != null && (renderMaterial.name.Contains("DefaultTrackMaterial") || renderMaterial.shader.name == "Soullies/BlendUnlit" || renderMaterial.shader.name == "BlendUnlit"))
{
Texture2D tex = ThemeBundleManager.instance.GetObject<Texture2D>(customTextureThemeBundleName, customTextureName);
if (tex == null)
@@ -115,12 +113,12 @@ namespace Ichni.RhythmGame
// Emission
if (enableEmission)
{
meshRenderer.material.EnableKeyword("_EMISSION_ON");
meshRenderer.material.SetFloat("_EnableEmission", 1);
block.SetColor("_EmissionColor", Color.white * Mathf.Pow(2, emissionIntensity));
}
else
{
meshRenderer.material.DisableKeyword("_EMISSION_ON");
meshRenderer.material.SetFloat("_EnableEmission", 0);
block.SetColor("_EmissionColor", Color.black);
}

View File

@@ -21,11 +21,7 @@ namespace Ichni.RhythmGame
this.meshRenderer.enabled = true;
this.meshGenerator = splineRenderer;
#if UNITY_EDITOR
this.renderMaterial = material == null ? EditorManager.instance.basePrefabs.defaultTrackMaterial : material;
#else
this.renderMaterial = material;
#endif
this.splineRenderer.spline = track.trackPathSubmodule.path;
this.splineRenderer.doubleSided = true;

View File

@@ -19,11 +19,7 @@ namespace Ichni.RhythmGame
this.meshRenderer = pathGenerator.GetComponent<MeshRenderer>();
this.meshRenderer.enabled = true;
this.meshGenerator = pathGenerator;
#if UNITY_EDITOR
this.renderMaterial = material == null ? EditorManager.instance.basePrefabs.defaultTrackMaterial : material;
#else
this.renderMaterial = material;
#endif
this.pathGenerator.spline = track.trackPathSubmodule.path;
this.pathGenerator.doubleSided = true;
this.pathGenerator.clipFrom = 0;

View File

@@ -19,11 +19,7 @@ namespace Ichni.RhythmGame
this.meshRenderer = surface.GetComponent<MeshRenderer>();
this.meshRenderer.enabled = true;
this.meshGenerator = surface;
#if UNITY_EDITOR
this.renderMaterial = material == null ? EditorManager.instance.basePrefabs.defaultTrackMaterial : material;
#else
this.renderMaterial = material;
#endif
this.surface.spline = track.trackPathSubmodule.path;
this.surface.doubleSided = true;
this.surface.clipFrom = 0;

View File

@@ -22,11 +22,7 @@ namespace Ichni.RhythmGame
this.meshRenderer = tubeGenerator.GetComponent<MeshRenderer>();
this.meshRenderer.enabled = true;
this.meshGenerator = tubeGenerator;
#if UNITY_EDITOR
this.renderMaterial = material == null ? EditorManager.instance.basePrefabs.defaultTrackMaterial : material;
#else
this.renderMaterial = material;
#endif
this.tubeGenerator.spline = track.trackPathSubmodule.path;
this.tubeGenerator.doubleSided = true;
this.tubeGenerator.clipFrom = 0;

View File

@@ -64,6 +64,8 @@ namespace Ichni.RhythmGame
trail.trailRenderer.widthCurve = widthCurve;
trail.trailRenderer.colorGradient = gradient;
if (isFirstGenerated) trail.AfterInitialize();
return trail;
}