Exemplo n.º 1
0
    private void Init()
    {
        for (int i = oscEventUiContainer.childCount - 1; i >= 0; --i)
        {
            DestroyImmediate(oscEventUiContainer.GetChild(i).gameObject);
        }
        timeMachineOscEvents.Clear();

        foreach (var c in timeMachineTrackManeger.clipValues)
        {
            var oscEventValue = new TimeMachineOscEvent();
            oscEventValue.address = $"/{c.name}";
            oscEventValue.index   = c.index;
            oscEventValue.name    = c.name;
            timeMachineOscEvents.Add(oscEventValue);
            oscIn.MapInt(oscEventValue.address, OnReceiveMoveClipEvent);
            var ui = Instantiate(timeMachineOscEventUI, oscEventUiContainer);
            ui.oscIn      = oscIn;
            ui.controller = this;
            ui.oscEvent   = oscEventValue;
            var message = new OscMessage();
            message.address = ui.oscAddress;
            message.Add(c.index);
            ui.SetTestOscMessage(oscOut, message);
        }
        // oscIn
    }
    public void InitOSCEvent()
    {
        var newOscEventValue = new TimeMachineOscEvent();

        newOscEventValue.address = oscAddress;
        newOscEventValue.index   = timeMachineOscEvent.index;
        newOscEventValue.name    = timeMachineOscEvent.name;
        oscIn.MapInt(newOscEventValue.address, controller.OnReceiveMoveClipEvent);
        oscEvent = newOscEventValue;
        var message = new OscMessage();

        message.address = newOscEventValue.address;
        message.Add(newOscEventValue.index);
        testOscMessage = message;
    }
Exemplo n.º 3
0
    public void AddNewEvent()
    {
        var oscEventValue = new TimeMachineOscEvent();

        oscEventValue.address = "/Test";
        oscEventValue.index   = 0;
        oscEventValue.name    = "Test";
        timeMachineOscEvents.Add(oscEventValue);
        // oscIn.MapInt(  oscEventValue.address,OnReceiveMoveClipEvent );
        var ui = Instantiate(timeMachinePlainOscEventUI, oscEventUiContainer);

        ui.oscEvent = oscEventValue;
        var message = new OscMessage();

        message.address = ui.oscAddress;
        message.Add(oscEventValue.index);
        ui.SetTestOscMessage(oscOut, message);
    }