@@ -15,7 +15,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
|
||||
public MeshGenerator meshGenerator;
|
||||
public SplinePositioner headPoint, tailPoint;
|
||||
|
||||
private MaterialPropertyBlock materialPropertyBlock;
|
||||
public override Vector3 noteVisualPosition => headPoint.transform.position;
|
||||
|
||||
public new static DTMNoteVisualHold GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
@@ -29,6 +29,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
public override void Initialize(string name, Guid elementGuid, List<string> tags, bool isFirstGenerated, GameElement parentElement)
|
||||
{
|
||||
base.Initialize(name, elementGuid, tags, isFirstGenerated, parentElement);
|
||||
materialPropertyBlock = new();
|
||||
Observable.NextFrame().Subscribe(_ =>
|
||||
{
|
||||
Recover();
|
||||
@@ -86,8 +87,8 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
Renderer rend = part.GetComponent<Renderer>();
|
||||
if (rend != null)
|
||||
{
|
||||
rend.materials[0].SetFloat("_MainAlpha", 1f);
|
||||
rend.materials[1].SetFloat("_MainAlpha", 1f);
|
||||
materialPropertyBlock.SetFloat("_MainAlpha", 1f);
|
||||
rend.SetPropertyBlock(materialPropertyBlock);
|
||||
note.track.trackPathSubmodule.path.RebuildImmediate();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user