Skip to content

Commit 784bb42

Browse files
committed
Pull out the computed result in ExecuteOn for easier debugging
1 parent 222bc26 commit 784bb42

File tree

1 file changed

+3
-1
lines changed
  • Runtime/SassyPatching/Nodes/Statements/SelectionLevel

1 file changed

+3
-1
lines changed

Runtime/SassyPatching/Nodes/Statements/SelectionLevel/Field.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using PatchManager.SassyPatching.Nodes.Expressions;
66
using PatchManager.SassyPatching.Nodes.Indexers;
77
using UniLinq;
8+
using UnityEngine;
89
using Environment = PatchManager.SassyPatching.Execution.Environment;
910

1011
namespace PatchManager.SassyPatching.Nodes.Statements.SelectionLevel
@@ -48,7 +49,8 @@ public void ExecuteOn(Environment environment, ISelectable selectable, IModifiab
4849

4950
var current = modifiable.GetFieldValue(FieldName);
5051
var subEnv = new Environment(environment.GlobalEnvironment, environment);
51-
modifiable.SetFieldValue(FieldName, ComputeValues(subEnv, current));
52+
var computed = ComputeValues(subEnv, current);
53+
modifiable.SetFieldValue(FieldName, computed);
5254
}
5355
private DataValue ComputeValues(Environment subEnv, DataValue current, int layer = 0)
5456
{

0 commit comments

Comments
 (0)