The Live Editor plugin is in a bit a catch 22:
It sounds potentially very useful, but is in an experimental state.
Because it’s experimental, there’s no documentation.
Because there’s no documentation, no one knows how to use it.
Because no one knows how to use it, nobody’s trying it.
Because nobody’s trying it, there’s not enough noise made about it to get it given more attention and take it out of the experimental phase.
I got it to work (with a caveat) in 4.13, so I thought I’d share the steps.
- Enable the plugin
Duh. It’s located in Edit> Plugins > Input Devices.
Enable Live Editor and Live Editor Listen Server (I’m not entirely sure the server is necessary for a single user use case).
You may have to restart the editor.
- Create the blueprint
The Live Editor plugin contains a new type of class called LiveEditorBlueprint.
This is where the work is actually done.
Create a new Blueprint Class that inherits from LiveEditorBlueprint.
Then, you’ll need to override the On Init event and register the events you want to listen to. Example:
The parameters on the Register for Live Edit Event node work as follows:
- Event Name: the name of the Custom Event you want to register.
- Description: when the time comes to bind MIDI controls to events, the binding wizard will use display that description
- Permitted Bindings: what type of control you’ll accept for this event. In a nutshell: Continuous = dial, Fixed = slider, Note On/Off = button.
Once you’ve done this, you need your blueprint to actually do something. Add a Custom Event of the appropriate name, with the following inputs, and do whatever you want with it. In my example, I’m going to modify the intensity of the currently selected light in increments of 5 units.
Delta: For continuous controls, it returns 1 if you turn the dial to the right, -1 if you turn it to the left. For fixed control, returns the difference between the current and the previous value of the controller.
**Midi Value: **The actual action value sent by the MIDI controller. You most likely don’t need to care about this.
Control type: The type of control that triggered the event. Remember that you can bind several types of control to the same event, and you might want it to behave differently depending on how the event was called.
Repeat the operation for every event you wish to set up.
- Set up the MIDI controller
I actually don’t have a MIDI controller, but Android phones can act as MIDI controllers when plugged via USB. So I just download a MIDI controller app to do my tests.
Assuming your MIDI controller is plugged in and in working condition, go to Window > Developer Tools > Live Editor.
Your controller should show up in the list of devices. If it doesn’t, I can’t help you.
Next, you need to configure it. Simply follow the instructions (endless encoders means dials and sliders) and you should end up with something like this:
This essentially tells Unreal what MIDI signals to interpret as button presses and dial turns.
- Bind blueprints to controls.
Select your custom LiveEditorBlueprint in the Content Browser, then in the Live Editor Window, click on Select Blueprint. Your blueprint should now be added to the list. As you can see, you can several LiveEditorlueprints, so you can keep things organised.
Click Bind. NOTE: If the blueprint you’ve selected doesn’t do a Register for Live Edit Event, Unreal WILL crash.
For each event you’ve set up, the Live Editor will ask you to tell it which button/knob to map the event to. You do this by just pressing/turning the appropriate control on your controller.
Once you’ve done this, click the Activate button on the blueprint and voilà.
This works both in Editor and in Simulate mode.
So what about the caveat I mentioned at the beginning?
In my example, while the MIDI controller modifies the light Intensity property as expected (you can see the value change in the details panel), the change isn’t actually reflected in the viewport until I touch the actor in some way (by moving it, or by changing another property the conventional way), even though my viewport is set to real time.
Not a massive deal, but if I need to nudge the actor whenever I do this, I’m kind of losing the point of doing all this.
But anyway, I hope this will encourage people to try it, and if they like it to request that more work gets done on it. I certainly would.