Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.73 KB

File metadata and controls

42 lines (32 loc) · 1.73 KB

UniRCP

Unity Implementation of the Rabbit Control Protocol (https://github.com/rabbitControl/RCP)

Dependencies:

What is this

A reactive server implementation for a rapid setup of remote controlling (almost) everything within unity during runtime.
Using RabbitControl, a client application (i.e. here which is also online here) automatically generates a UI for remote controlling the parameters that you choose to expose via this RCP server.

Usage

Place the RabbitControl Prefab from this Repo in your Scene.
By default it will use Websockets as the transport layer.

To expose some fields/parameters/transforms to the RCP Server, have a look at the ControlTest.cs file, for a single float it would look like this:

using RabbitControl;

public class ControlTest : MonoBehaviour {

    public float myFloat;
   
    void Start () {
        SetupRabbitControls();     
    }

    private void SetupRabbitControls()
    {    
        myFloat
            .ToValueParameter(nameof(myFloat))    //create a RCP Parameter out of your variable and expose it to/on the server
            .BindParameterTo(() => myFloat, x => myFloat = x); //two way binding using of the value using BindingsRx internally
     }

Features

  • Two-Way Binding (you can choose not to though)
  • Supports a lot of basic datatypes (int, float, string, enum, ...)
  • grouping of multiple parameters (also nested groups)
  • this is a WIP, not all datatypes are supported yet, very much untested.