What you can edit¶
Most day-to-day gameplay edits work: change a method, save the file, and the next time that method runs it uses the new logic.
Method bodies¶
Edit anything inside a method that has a normal body ({ … } or =>).
Works on:
MonoBehaviourscripts- Regular and static classes
- Structs
Modern C# inside the method is fine - switch expressions, pattern matching, null-conditionals, local functions, and similar.
Abstract, extern, and empty partial methods are skipped (there is nothing to patch).
Properties and indexers¶
You can patch:
- Property
get/setaccessors that have a body - Auto-properties once you expand them to a full accessor
- Indexers with bodied accessors
Operators¶
User-defined operators with a method body can be patched the same way as normal methods.
Generics¶
Generic methods and generic types are supported.
If a generic method never runs from your loaded game code, Hot Patch may not hook it yet. Call it once, edit a caller, or press Recompile in the Hot Patch window.
New fields (limited)¶
You can add a new instance field during Play Mode and use it inside patched methods.
This is not full Inspector hot-reload:
- Existing objects do not re-run field initializers
- New static fields are not supported
- The Inspector will not fully track hot-added fields
See Limitations → Fields.
Usings and nullables¶
using directives in the file are respected. Nullable reference and value types are supported.