All Projects → keijiro → Oscjack

keijiro / Oscjack

Licence: unlicense
Lightweight implementation of OSC server/client in C# (Unity)

Projects that are alternatives of or similar to Oscjack

Rcam
Real time volumetric video capture for live visuals
Stars: ✭ 128 (-53.62%)
Mutual labels:  unity, unity3d, osc
Extosc
extOSC is a tool dedicated to simplify creation of applications in Unity with OSC protocol usage.
Stars: ✭ 69 (-75%)
Mutual labels:  unity, unity3d, osc
Rdsystem
Reaction-diffusion system with CustomRenderTexture.
Stars: ✭ 271 (-1.81%)
Mutual labels:  unity, unity3d
Tork
Arcade vehicle physics for Unity
Stars: ✭ 256 (-7.25%)
Mutual labels:  unity, unity3d
Unity Editor Toolbox
Tools, custom attributes, drawers, hierarchy overlay, and other extensions for the Unity Editor.
Stars: ✭ 273 (-1.09%)
Mutual labels:  unity, unity3d
Noahgameframe
A fast, scalable, distributed game server engine/framework for C++, include the actor library, network library, can be used as a real time multiplayer game engine ( MMO RPG/MOBA ), which support C#/Lua script/ Unity3d, Cocos2dx and plan to support Unreal.
Stars: ✭ 3,258 (+1080.43%)
Mutual labels:  unity, unity3d
Colyseus Unity3d
⚔ Colyseus Multiplayer SDK for Unity
Stars: ✭ 251 (-9.06%)
Mutual labels:  unity, unity3d
Recyclable Scroll Rect
Recyclable Scroll Rect reuses or recycles the least number of cells required to fill the viewport. As a result a huge number of items can be shown in the list without any performance hit.
Stars: ✭ 262 (-5.07%)
Mutual labels:  unity, unity3d
Alloy
Alloy physical shader framework for Unity.
Stars: ✭ 244 (-11.59%)
Mutual labels:  unity, unity3d
Unitynuget
Provides a service to install NuGet packages into a Unity project via the Unity Package Manager
Stars: ✭ 257 (-6.88%)
Mutual labels:  unity, unity3d
Cloner
An example of use of procedural instancing.
Stars: ✭ 260 (-5.8%)
Mutual labels:  unity, unity3d
Riru Il2cppdumper
Using Riru to dump il2cpp data at runtime
Stars: ✭ 259 (-6.16%)
Mutual labels:  unity, unity3d
Nodebaseddialoguesystem
Node Based Dialogue System for Unity
Stars: ✭ 269 (-2.54%)
Mutual labels:  unity, unity3d
Gameframework
This is literally a game framework, based on Unity game engine. It encapsulates commonly used game modules during development, and, to a large degree, standardises the process, enhances the development speed and ensures the product quality.
Stars: ✭ 3,318 (+1102.17%)
Mutual labels:  unity, unity3d
Videoplayereffects
Experimental special effects for VideoPlayer (Unity 5.6 new feature)
Stars: ✭ 252 (-8.7%)
Mutual labels:  unity, unity3d
Cradle
Play Twine stories in Unity.
Stars: ✭ 242 (-12.32%)
Mutual labels:  unity, unity3d
Deform Prototype
A prototyped framework for deforming meshes in the editor and at runtime in Unity. Not in development anymore, but it's still pretty awesome!
Stars: ✭ 256 (-7.25%)
Mutual labels:  unity, unity3d
Uieffect
UIEffect is an effect component for uGUI element in Unity. Let's decorate your UI with effects!
Stars: ✭ 3,449 (+1149.64%)
Mutual labels:  unity, unity3d
Midianimationtrack
SMF (.mid) file importer for Unity Timeline
Stars: ✭ 243 (-11.96%)
Mutual labels:  unity, unity3d
Cosinegradient
Cosine gradient generator for Unity
Stars: ✭ 244 (-11.59%)
Mutual labels:  unity, unity3d

OSC Jack

gif

OSC Jack is a lightweight implementation of OSC (Open Sound Control) server and client that is written in C#. It mainly aims to provide basic OSC support to Unity.

System Requirements

  • Unity 2019.4 or later

OSC Jack uses and requires a System.Net.Sockets implementation. It means that it runs on most platforms but doesn't support few special platforms like WebGL or network-restrictive consoles.

Installation

This package uses the scoped registry feature to resolve package dependencies. Please add the following sections to the manifest file (Packages/manifest.json).

To the scopedRegistries section:

{
  "name": "Keijiro",
  "url": "https://registry.npmjs.com",
  "scopes": [ "jp.keijiro" ]
}

To the dependencies section:

"jp.keijiro.osc-jack": "1.0.3"

After changes, the manifest file should look like below:

{
  "scopedRegistries": [
    {
      "name": "Keijiro",
      "url": "https://registry.npmjs.com",
      "scopes": [ "jp.keijiro" ]
    }
  ],
  "dependencies": {
    "jp.keijiro.osc-jack": "1.0.3",
    ...

OSC Components

OSC Event Receiver

OSC Event Receiver

OSC Event Receiver receives OSC messages and invokes a UnityEvent with received data. This can be a handy way to modify property values or invoke methods based on OSC messages.

OSC Property Sender

OSC Property Sender

OSC Property Sender provides a handy way to send OSC messages based on a component property value. It observes a given component property, and sends OSC messages when changes in the property are detected.

OSC Monitor

OSC Monitor

OSC Monitor is a small utility to show incoming messages to existing OSC servers. It's useful to check if messages are correctly received at the servers. To open the monitor, navigate to Window > OSC Monitor.

Scripting Interface

OSC Jack also provides non-Unity dependent classes that can be used from any C# script. These classes are useful when sending/receiving OSC messages that are not directly related to component properties or events.

OSC Client class

OscClient provides basic functionalities to send OSC messages to a specific UDP port of a host. It supports int, float and string types, and it's capable of sending up to four elements within a single message. It implements IDisposable, so it can be manually terminated by calling the Dispose method (or left it until automatically being finalized).

// IP address, port number
var client = new OscClient("127.0.0.1", 9000);

// Send two-component float values ten times.
for (var i = 0; i < 10; i++) {
    yield return new WaitForSeconds(0.5f);
    client.Send("/test",       // OSC address
                i * 10.0f,     // First element
                Random.value); // Second element
}

// Terminate the client.
client.Dispose();

OSC Server class

OscServer provides basic functionalities to receive OSC messages that are sent to a specific UDP port of the host. It starts receiving messages when a server instance is created, and terminates when disposed (via the IDisposable interface).

You can add delegates to MessageDispatcher to receive messages sent to a specific OSC address, or you can give an empty string as an address to receive all messages arrived at the port.

Note that the delegates are to be called in the server thread; You have to queue the events for processing them in the main thread (this will be required in most cases of Unity).

Just like the client class, it supports int, float and string types, and capable of receiving up to four elements within a single message.

var server = new OscServer(9000); // Port number

server.MessageDispatcher.AddCallback(
    "/test", // OSC address
    (string address, OscDataHandle data) => {
        Debug.Log(string.Format("({0}, {1})",
            data.GetElementAsFloat(0),
            data.GetElementAsFloat(1)));
    }
);

yield return new WaitForSeconds(10);
server.Dispose();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].