Skip to content

comoc/UnityAbletonLinkKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnityAbletonLinkKit

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.

Demo

Creating a Unity application

  • Create a new Unity project.

  • Copy the Plugins folder into the Assets folder 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 Device to iPhone + iPad.
      • Set Target SDK to Device SDK.
    • In Build Settings,
      • Set the Platform to iOS.
  • Build the Unity project.
  • Open the Unity-iPhone.xcodeproj output from the Unity build in Xcode.
  • Download a LinkLit.zip file from its Release page.
  • Extract the LinkLit.zip to somewhere.
  • In Xcode's Frameworks folder, add a reference to LinkKit.xcframework in the extracted LinkKit folder.
  • In Xcode, go to File > Project Settings and set Build System to New Build System (Default).
  • Build and run it on the iOS device

Note

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.

License

By using LinkKit you agree to the terms and conditions of the Ableton Link SDK license.

Excluding LinkKit, licensed under CC0.

CC0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published