OBS Websocket GD
A Godot addon to interact with obs-websocket. Tested on Godot 3.4.
IMPORTANT
This addon targets obs-websocket 5.x. Please use the obs-websocket_4.x
branch if you are using obs-websocket 4.x.
Game/App Quickstart
- Install obs-websocket for your platform
- Configure obs-websocket in OBS and set the password to something of your choosing
- Clone this project
- Instance in the
addons/obs_websocket_gd/obs_websocket.tscn
file somewhere in your project - By default, the addon tries to connect to
localhost:4444
with a password ofpassword
. Change the password inaddons/obs_websocket_gd/obs_websocket.gd
to the password set in step 2. The variables are exported for convenience - (OPTIONAL) Connect some listener to the
obs_data_received(update_data)
signal inobs_websocket.gd
.obs_data_received
outputs anObsMessage
data structure. This data structure stores the raw response and also maps the data to the expected OpCode fields. - Call the
send_command(command: String, data: Dictionary = {})
method on theobs_websocket.gd
instance. Reference the obs-websocket protocol to find out what commands + data to send