https://github.com/funatsufumiya/godot_osc
OSC addon for Godot, implemented with C/C++
https://github.com/funatsufumiya/godot_osc
gdextension godot godot4
Last synced: 6 months ago
JSON representation
OSC addon for Godot, implemented with C/C++
- Host: GitHub
- URL: https://github.com/funatsufumiya/godot_osc
- Owner: funatsufumiya
- License: mit
- Created: 2024-08-06T02:40:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-23T12:53:16.000Z (about 1 year ago)
- Last Synced: 2025-03-25T05:06:25.832Z (7 months ago)
- Topics: gdextension, godot, godot4
- Language: C++
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# godot_osc
OSC addon for Godot 4.2.2 - 4.4
## Usage
```gdscript
@onready var osc:OSC = OSC.new_from(12345, 12346, "0.0.0.0") # port_in, port_out, ipfunc _ready():
add_child(osc)osc.onMessage("/test", func(addr: String, args: Array):
print("[OSC] /test")
print("Address: ", addr)
print("Args: ", args)
)# Message output
osc.send("/address", [123])func _exit_tree():
osc.stop()
remove_child(osc)func _process(delta):
pass
```see [`project/`](project) and [`osc_receiver.gd`](project/osc_receiver.gd) for example usage.
## Install
NOTE: [godot_osc_bin](https://github.com/funatsufumiya/godot_osc_bin) makes installation even easier.
- create a `addons` folder in your godot project
- place `osc.gdextension` below:```text
[configuration]entry_symbol = "gdextension_init"
compatibility_minimum = 4.2[libraries]
macos.debug = "bin/libosc.macos.debug.framework"
macos.release = "bin/libosc.macos.release.framework"
windows.debug.x86_64 = "bin/libosc.windows.debug.x86_64.dll"
windows.release.x86_64 = "bin/libosc.windows.release.x86_64.dll"
linux.debug.x86_64 = "bin/libosc.linux.debug.x86_64.so"
linux.release.x86_64 = "bin/libosc.linux.release.x86_64.so"
linux.debug.arm64 = "bin/libosc.linux.debug.arm64.so"
linux.release.arm64 = "bin/libosc.linux.release.arm64.so"
linux.debug.rv64 = "bin/libosc.linux.debug.rv64.so"
linux.release.rv64 = "bin/libosc.linux.release.rv64.so"
```- create a `bin` folder in your godot project
- place dlls from [Releases](https://github.com/funatsufumiya/godot_osc/releases) into `bin` folder## Build and Run
(This process is needed only if you build this plugin by your own)
```bash
$ git submodule update --init --recursive --recommend-shallow --depth 1
$ scons
$ scons target=template_release
$ godot project/project.godot # (only first time)
$ godot --path project/ # run demo
```