This commit is contained in:
SoulliesOfficial
2025-08-19 08:13:47 -04:00
parent 66ec7fb4a9
commit 2e4398b9c1
175 changed files with 146598 additions and 2124247 deletions

View File

@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Ichni.RhythmGame;
using UnityEngine;
using UnityEngine.Events;
@@ -290,8 +291,8 @@ namespace Ichni.Editor
DynamicUICustomCurveKeyframeUnit unit = unitList[i] as DynamicUICustomCurveKeyframeUnit;
newCurve.AddKey(unit.GetValue());
}
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newCurve);
FieldInfo fieldInfo = connectedBaseElement.GetType().GetField(parameterName);
fieldInfo.SetValue(connectedBaseElement, newCurve);
};
return this;
}
@@ -327,7 +328,13 @@ namespace Ichni.Editor
{
newColorKeys.Add((unit as DynamicUIGradientColorKeyUnit).GetValue());
}
(connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement) as Gradient).colorKeys = newColorKeys.ToArray();
FieldInfo fieldInfo = connectedBaseElement.GetType().GetField(parameterName);
Gradient originalGradient = fieldInfo.GetValue(connectedBaseElement) as Gradient;
Gradient newIndependentGradient = new Gradient();
newIndependentGradient.alphaKeys = originalGradient.alphaKeys;
newIndependentGradient.mode = originalGradient.mode;
newIndependentGradient.colorKeys = newColorKeys.ToArray();
fieldInfo.SetValue(connectedBaseElement, newIndependentGradient);
};
return this;
@@ -364,7 +371,13 @@ namespace Ichni.Editor
{
newAlphaKeys.Add((unit as DynamicUIGradientAlphaKeyUnit).GetValue());
}
(connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement) as Gradient).alphaKeys = newAlphaKeys.ToArray();
FieldInfo fieldInfo = connectedBaseElement.GetType().GetField(parameterName);
Gradient originalGradient = fieldInfo.GetValue(connectedBaseElement) as Gradient;
Gradient newIndependentGradient = new Gradient();
newIndependentGradient.colorKeys = originalGradient.colorKeys;
newIndependentGradient.mode = originalGradient.mode;
newIndependentGradient.alphaKeys = newAlphaKeys.ToArray();
fieldInfo.SetValue(connectedBaseElement, newIndependentGradient);
};
return this;
@@ -406,7 +419,8 @@ namespace Ichni.Editor
KeyValuePair<string, int> pair = (unit as DynamicUIStringIntPairUnit).GetValue();
dictionaryList.Add(pair.Key, pair.Value);
}
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, dictionaryList);
FieldInfo fieldInfo = connectedBaseElement.GetType().GetField(parameterName);
fieldInfo.SetValue(connectedBaseElement, dictionaryList);
};
return this;

View File

@@ -77,6 +77,8 @@ namespace Ichni.Editor
var clipSettings = container.GenerateSubcontainer(3);
var applyClipButton = escapeConfirmWindow.GenerateButton(clipSettings, "Yes", () =>
{
InformationTransistor.instance.isLoadedProject = true;
InformationTransistor.instance.loadedProjectName = EditorManager.instance.projectInformation.projectName;
SceneManager.LoadScene("EditorScene");
});
var cancelButton = escapeConfirmWindow.GenerateButton(clipSettings, "No", () =>