Method problem

oml 4 years ago updated by Lazlo Bonin (Lead Developer) 4 years ago 1


I'm new to bolt,

I'm trying to rewrite my c# script to blot script.but i'm stuck on some method problem.

here is my c# script.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEngine.Events;

public class ReceiveOSCValue : MonoBehaviour {

    OSC osc;
    public string address = "/address 0-1 > remap1-remap2";
    public float remap1 = 0.0f;
    public float remap2 = 1.0f;
    public class oscFloatEvent : UnityEvent <float> { }
    public oscFloatEvent onChangeEvent;

    private float oscFloatin;

    private float oscFloatRemap;

    // Use this for initialization
    void Start () {
        osc = GameObject.Find("OSC").GetComponent<OSC>();

        osc.SetAddressHandler(address, OnReceiveX);

// Update is called once per frame
void Update () {

    void OnReceiveX(OscMessage message)
        oscFloatin = message.GetFloat(0);

        oscFloatRemap = oscFloatin * (remap2 - remap1) + remap1;



here is my bolt script:

I don't know how to connect with "message" method in SetAddressHaddler.

Any help?. thanks.

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

Hi oml, welcome to the community!

Sorry for the late reply. Unfortunately, Bolt does not support delegates (passing a method as an argument, like OnReceiveX in your example). Instead, you should use custom events to relay execution.