Capturing Unity screens with OBS Studio
Until now, I had no issues using the Xbox Game Bar included with Windows for screen capture, but since I started using Unity, I found it troublesome to edit the gameplay footage, so I am switching back to OBS Studio, which I used previously.
Installing OBS Studio
Download from the Microsoft Store
You can download and install it from the Microsoft Store.
No particularly complex settings are required.
Screen capture
Startup screen
This is what the screen looks like when you launch it.

Registering the source to capture
・Click the "+" at the bottom of the Sources window to open the menu
・Since I am capturing the Unity screen this time, select Window Capture
・Enter a source name in the Create/Select Source window and click OK
・Click the Window dropdown and select the Unity screen from the menu
・The Unity screen will appear, so click OK




Recording and settings for the Unity screen
Recording
You can start recording by clicking Start Recording in the Controls section at the bottom right.
By default, it saves recordings in the Videos folder in mkv format.
(*This is inconvenient as is, so I will change the settings later)

Stop recording
While recording, the same button changes to a Stop Recording button, which you can use to stop.

Recording looks like this

Change the recording save location
・Select File > Settings > Output > Recording
・Select the save location in Recording file path


Change the recording format
The default is a proprietary format called mkv, so change it to mp4.
※With the mkv format, you cannot view it in standard players or convert it to a GIF.

Hotkeys settings
It is convenient to set shortcuts in the Hotkeys section of the settings screen.

Set the recording area
You can now record the entire Unity screen.
This time, I will specify the range to just the Game window to perform a cropped recording.
Set a new source
Since I might also record the entire Unity screen, I will set a new source.
・Add a new source
・Select the Unity screen (up to this point, it is the same as registering a source to capture)


Select the recording area
・Hold down the ALT key and drag the red frame of the Unity screen to specify the selection area


Scale to fit the screen
Use Edit > Transform > Fit to screen to scale it to fit the screen.



Convert MP4 to GIF
My own GIF conversion tool (specialized for posting on note)
If you want to convert mp4 to GIF, this will do the job.
Since GIFs on note must be within 15 seconds, you can just view it in another viewer and specify the crop range.

OBS has become incredibly easy to use!
It's crazy that this is completely free.
I hope this is helpful to someone.
