Skip to content

Commit

Permalink
hehe
Browse files Browse the repository at this point in the history
PadRight can suck my-
  • Loading branch information
MistressPlague committed Apr 21, 2024
1 parent 0841488 commit 36145fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Scripts/KannaProteccRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,6 @@ public void EncryptAvatar()
DestroyImmediate(encodedGameObject);
newobj.name = newobj.name.Replace("_Encrypted_Obfuscated", "_KannaProteccted");

KannaLogger.WriteLogsToFile(LogLocation);

EditorSceneManager.MarkAllScenesDirty();

AssetDatabase.Refresh();
Expand All @@ -328,9 +326,9 @@ public void EncryptAvatar()
catch (Exception ex)
{
KannaLogger.LogToFile(ex.ToString(), LogLocation, KannaLogger.LogType.Error);

KannaLogger.WriteLogsToFile(LogLocation);
}

KannaLogger.WriteLogsToFile(LogLocation);
}

public static Type GetTypeFromAnyAssembly(string FullName)
Expand Down
5 changes: 3 additions & 2 deletions Scripts/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ public class Utilities

public static string GenerateRandomUniqueName(bool safeNaming, bool canHaveSpaces = false)
{
var str = $"Kanna{((safeNaming || canHaveSpaces) ? $"_{GUID.Generate()}" : "")}";
var str = $"Kanna{((safeNaming) ? $"_{GUID.Generate()}" : "")}";

if (!safeNaming)
{
str = str.PadRight(Length, '\u200B'); // \u200B = ZWSP
// \u200B = ZWSP
str += new string('\u2008', Length);

Length++;
}
Expand Down

0 comments on commit 36145fb

Please sign in to comment.