Skip to content

Commit 25b1f4d

Browse files
committed
Sanity checked DistributionNameOverwriteText and fixed the name not being the same between the script and the patcher when overwriting the name
Sanity checked DistributionNameOverwriteText Fixed the name not being the same between the script and the patcher when overwriting the name
1 parent 26f4a22 commit 25b1f4d

35 files changed

Lines changed: 6577 additions & 12877 deletions

DemoProject/Assets/Hash's_Things/EditDistributor/Editor/EditDistributorBuilder.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,19 @@ void OnGUI()
132132
else
133133
{
134134
outputDirectory = Path.Combine(CommunFonctions.GoUpNDirs(CustomfbxPath, 2), "patcher", "data", "DiffFiles");
135-
PatcherScriptDestDir = Path.Combine(CommunFonctions.GoUpNDirs(outputDirectory, 2), "Editor", Path.GetFileNameWithoutExtension(CustomfbxPath).Replace(" ", "_") + "_Patcher.cs");
136135
if (NameOverwriteTickBox)
137136
{
138-
if (!string.IsNullOrEmpty(DistributionNameOverwriteText)) patcherFolder = Path.Combine(CommunFonctions.GoUpNDirs(CustomfbxPath, 3), DistributionNameOverwriteText, "patcher");
137+
if (!string.IsNullOrEmpty(DistributionNameOverwriteText))
138+
{
139+
patcherFolder = Path.Combine(CommunFonctions.GoUpNDirs(CustomfbxPath, 3), DistributionNameOverwriteText, "patcher");
140+
PatcherScriptDestDir = Path.Combine(CommunFonctions.GoUpNDirs(outputDirectory, 2), "Editor", DistributionNameOverwriteText.Replace(" ", "_") + "_Patcher.cs");
141+
}
142+
}
143+
else
144+
{
145+
patcherFolder = Path.Combine(CommunFonctions.GoUpNDirs(CustomfbxPath, 2), "patcher");
146+
PatcherScriptDestDir = Path.Combine(CommunFonctions.GoUpNDirs(outputDirectory, 2), "Editor", Path.GetFileNameWithoutExtension(CustomfbxPath).Replace(" ", "_") + "_Patcher.cs");
139147
}
140-
else patcherFolder = Path.Combine(CommunFonctions.GoUpNDirs(CustomfbxPath, 2), "patcher");
141148
}
142149
}
143150
else
@@ -167,7 +174,7 @@ void OnGUI()
167174
UserEditorWindowName = EditorGUILayout.TextField(new GUIContent("Your Name: ", "Will be used to organize your patchers in the menu bar"), UserEditorWindowName);
168175
if (NameOverwriteTickBox)
169176
{
170-
if (! string.IsNullOrEmpty(DistributionNameOverwriteText)) EditorWindowPath = "Tools/" + UserEditorWindowName + "/" + DistributionNameOverwriteText + "_Patcher";
177+
if (! string.IsNullOrEmpty(DistributionNameOverwriteText)) EditorWindowPath = "Tools/" + UserEditorWindowName + "/" + DistributionNameOverwriteText.Replace(" ", "_") + "_Patcher";
171178
}
172179
else EditorWindowPath = "Tools/" + UserEditorWindowName + "/" + Path.GetFileNameWithoutExtension(OGfbxPath) + "Patcher";
173180
if (string.IsNullOrEmpty(UserEditorWindowName))
@@ -446,7 +453,7 @@ private void BuildPatcher()
446453
string[] originalStrings = new string[] { "\"YourCoolAvatar\"", "\"YourCoolCustomAvatar\"", "NameOfWindow", "PatcherTemplate", "Tools/Hash/EditDistributor/(DO_NOT_USE)", "DistributionCreator", "CurrentPackageVersion", "AvatarName" };
447454
if (NameOverwriteTickBox)
448455
{
449-
if (!string.IsNullOrEmpty(DistributionNameOverwriteText)) remplacementStrings = new string[] { CommunFonctions.MakePathPlatformAgnostic(CommunFonctions.GetRelativePathToAssets(OGfbxPath)), CommunFonctions.MakePathPlatformAgnostic(CommunFonctions.GetRelativePathToAssets(CustomfbxPath)), DistributionNameOverwriteText + "_Patcher", DistributionNameOverwriteText + "_Patcher", EditorWindowPath, UserEditorWindowName, PackageName, DistributionNameOverwriteText };
456+
if (!string.IsNullOrEmpty(DistributionNameOverwriteText)) remplacementStrings = new string[] { CommunFonctions.MakePathPlatformAgnostic(CommunFonctions.GetRelativePathToAssets(OGfbxPath)), CommunFonctions.MakePathPlatformAgnostic(CommunFonctions.GetRelativePathToAssets(CustomfbxPath)), DistributionNameOverwriteText + "_Patcher", DistributionNameOverwriteText.Replace(" ", "_") + "_Patcher", EditorWindowPath, UserEditorWindowName, PackageName, DistributionNameOverwriteText };
450457
}
451458
else remplacementStrings = new string[] { CommunFonctions.MakePathPlatformAgnostic(CommunFonctions.GetRelativePathToAssets(OGfbxPath)), CommunFonctions.MakePathPlatformAgnostic(CommunFonctions.GetRelativePathToAssets(CustomfbxPath)), Path.GetFileNameWithoutExtension(CustomfbxPath).Replace(" ", "_") + "_Patcher", Path.GetFileNameWithoutExtension(CustomfbxPath).Replace(" ", "_") + "_Patcher", EditorWindowPath, UserEditorWindowName, PackageName, Path.GetFileNameWithoutExtension(OGfbxPath) };
452459
UnityEngine.Debug.Log(EditorWindowPath);

DemoProject/Assets/Hash's_Things/MyModifiedBlenderCube/patcher/data/hdiff/hpatchz/License.txt.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DemoProject/Assets/Hash's_Things/MyModifiedBlenderCube/patcher/data/hdiff/hpatchz/Linux.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DemoProject/Assets/Hash's_Things/MyModifiedBlenderCube/patcher/data/hdiff/hpatchz/Linux/hpatchz.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DemoProject/Assets/Hash's_Things/MyModifiedBlenderCube/patcher/data/hdiff/hpatchz/Mac.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DemoProject/Assets/Hash's_Things/MyModifiedBlenderCube/patcher/data/hdiff/hpatchz/Mac/hpatchz.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DemoProject/Assets/Hash's_Things/MyModifiedBlenderCube/patcher/data/hdiff/hpatchz/Windows.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DemoProject/Assets/Hash's_Things/MyModifiedBlenderCube/patcher/data/hdiff/hpatchz/Windows/hpatchz.exe.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DemoProject/Library/ArtifactDB

0 Bytes
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)