Lambdas & Closures
Simple lambdas
Editing a lambda inside a patched method works because the entire method body is recompiled.
Lambdas stored in static fields
If s_transform was assigned during Awake or Start, editing the lambda updates the method but the static field may still hold the old delegate until it is re-assigned. Re-run the assignment code or restart Play Mode.
Closures
Lambdas that capture existing local variables or fields continue to work after a patch.
If you add a new captured variable, the closure only updates when the lambda is re-created at runtime. For example, a lambda inside Array.Sort(() => ...) is re-created each call and will pick up changes immediately.