diff --git a/DynamicVariablePowerTools/DynamicVariablePowerTools.csproj b/DynamicVariablePowerTools/DynamicVariablePowerTools.csproj index e49427b..02a0bf9 100644 --- a/DynamicVariablePowerTools/DynamicVariablePowerTools.csproj +++ b/DynamicVariablePowerTools/DynamicVariablePowerTools.csproj @@ -10,7 +10,7 @@ DynamicVariablePowerTools Dynamic Variable Power Tools Banane9 - 0.1.0-beta + 0.1.1-beta This MonkeyLoader mod for Resonite adds a variety of powerful functions to dynamic variables and their spaces. README.md LGPL-3.0-or-later diff --git a/DynamicVariablePowerTools/RenameDirectlyLinkedVariables.cs b/DynamicVariablePowerTools/RenameDirectlyLinkedVariables.cs index bbc4e08..941499e 100644 --- a/DynamicVariablePowerTools/RenameDirectlyLinkedVariables.cs +++ b/DynamicVariablePowerTools/RenameDirectlyLinkedVariables.cs @@ -68,11 +68,12 @@ private static void RenameSpace(DynamicVariableSpace space, string newName) { space.Slot.ForeachComponentInChildren>(stringInput => { + // this eats variables like: Space/{0} - so can't construct new name from {newName}/{variableName} DynamicVariableHelper.ParsePath(stringInput.Value, out var spaceName, out var variableName); if (spaceName == null || spaceName != currentName) return; - stringInput.Value = $"{newName}/{variableName}"; + stringInput.Value = stringInput.Value.Replace(spaceName, newName); }, includeLocal: true, cacheItems: true); }