Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xADDBx committed Dec 22, 2024
1 parent 9452566 commit e3279e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion ToyBox/Classes/MainUI/PatchTool/Infrastructure/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEngine.Rendering;

namespace ToyBox.PatchTool;
public static class Patcher {
Expand Down
2 changes: 2 additions & 0 deletions ToyBox/Classes/MainUI/PatchTool/Utils/DeepCopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ private static Object InternalCopy(Object originalObject, IDictionary<Object, Ob
// Not copying this would result in weird side effects, like the m_Factory of a StaticCache being lost.
// if (typeof(Delegate).IsAssignableFrom(typeToReflect)) return null;
if (typeof(Delegate).IsAssignableFrom(typeToReflect)) return originalObject;

// Prevent messing up references by copying the cached instance of the blueprints.
if (!cloneTopBlueprint && typeof(BlueprintScriptableObject).IsAssignableFrom(typeToReflect)) return originalObject;

var cloneObject = targetObject ?? CloneMethod.Invoke(originalObject, null);
Expand Down

0 comments on commit e3279e7

Please sign in to comment.