UnityAbletonLinkKit is an iOS SDK for Ableton Link plugin for Unity.
The example application generated by the Unity project currently included in this repository will not work on devices running iOS 14 or later. Please see here for the necessary support.
-
Create a new Unity project.
-
Copy the
Pluginsfolder into theAssetsfolder of the Unity project. -
Write some script to use this plugin.
For example,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Example : MonoBehaviour {
// Use this for initialization
void Start () {
// IMPORTANT! To activate the connection, user must enable the setting manually.
AbletonLink.Instance.showLinkSettings();
}
// Update is called once per frame
void Update () {
double beat, phase, tempo, time;
int numPeers;
AbletonLink.Instance.update(out beat, out phase, out tempo, out time, out numPeers);
// We can obtain the latest beat and phase like this.
Debug.Log ("beat: " + beat + " phase:" + phase);
}
}- Attach the script to a GameObject (e.g. Main Camera or a GameObject).
- In Unity, configure the following.
- In
Project Settings > Player > iOS > Other Settings,- Set
Target DevicetoiPhone + iPad. - Set
Target SDKtoDevice SDK.
- Set
- In
Build Settings,- Set the
PlatformtoiOS.
- Set the
- In
- Build the Unity project.
- Open the Unity-iPhone.xcodeproj output from the Unity build in Xcode.
- Download a
LinkLit.zipfile from its Release page. - Extract the
LinkLit.zipto somewhere. - In Xcode's
Frameworksfolder, add a reference toLinkKit.xcframeworkin the extracted LinkKit folder. - In Xcode, go to
File > Project Settingsand setBuild SystemtoNew Build System (Default). - Build and run it on the iOS device
The Plugins folder contains a bundle of UnityAbletonLink for testing in the Editor on macOS.
If you run it in the Editor, you may get an error when you press the Play button once you set the Platform to PC, Mac & Linux Standalone in the Build Settings.
Difference between UnityAbletonLink and UnityAbletonLinkKit
UnityAbletonLinkKit has the showLinkSettings() API to enable user to control the connection to a Link server. Whereas UnityAbletonLink has not.
By using LinkKit you agree to the terms and conditions of the Ableton Link SDK license.
Excluding LinkKit, licensed under CC0.

