beta124.05
Guide: watch fields, watch methods, break on one object, code watch
Update the gen2 fork first: Settings > Install gen2 fork, then reboot. This Breeze needs gen2 v0.19; with an older fork every gen2 action says "Version mismatch".
Code watch: which part of the game did that?
You took a hit, fired a shot or opened a chest, and you want the code behind it. Until now you had to know where to look. Code watch looks everywhere at once.
It needs the game's function map. On a Unity game the Unity menu builds it; if you have used a class's Methods list it is already there.
- Open the gen2 menu, go to its second page and press Code watch, then Start.
- Go back to the game. It stutters for a few seconds while Breeze finds the code that runs all the time. A box at the top left counts; wait until it stops.
- Open Breeze and press Mark (Y).
- Go back to the game and do one thing, once.
- Open Breeze. The list shows the classes that ran something for the first time, the most first.
On the test game, one melee attack put AgentMelee, Hitbox, PlayerMelee and BaseDamage at the top of the list. One dodge gave a single line: AgentRoll::get_CanRoll.
| Button | Key | What it does |
|---|---|---|
| Start / Stop | R | run or end the watch |
| Mark | Y | count as new only what is first called after this |
| Clear | Minus | start again with every function waiting |
| View | ZL+Y | new since the mark, or everything called |
| Select | X | on a class: its functions; on a function: its code |
| Go to caller | ZL+X | the code that first called it |
| Watch methods | ZL + left stick click | stop, and watch this class's methods |
| Watch | ZL+Up | the game's own code, or everything |
| Expand screen | ZR+R | the list over the whole screen |
From the class to the object
On a class in the list, Watch methods starts beta124.04's method watch on it. That shows the object each method is called on, and Field view of object opens it. So the path is: do something in the game, find the class, find the live object, see its fields.
Good to know
- The stutter is only at the start. Each function pauses the game once, the first time it is called, and never again.
- The game's own code is the setting to start with. Everything adds the engine: more stutter and a longer list.
- If the thing you want already happened before you pressed Mark, it will not show as new. Press Clear, wait for the count to settle, Mark, and do it again.
- Stop the watch when you are done. While it runs, Breeze has changed the game's code at each function that has not been called yet. Stop puts all of it back.
- Stop also writes
code_watch.txtin the game's Breeze folder, with every called function in order. - Tried on a Unity game. Unreal and native games have not been tried yet.
For PC connect users
codewatch starts, marks, lists and stops a code watch from the PC. See docs/pcconnect.md.