This may have been asked already but I cannot find it. I may be looking under the wrong terminology as well. Where would I look to learn about executing a script I make in xCode from my Unity iPhone application?
Hello,
Very simple : you have to have Pro version and you use the DllImport function to ‘link’ your xCode function to Unity.
for example, in a C# class in your unity Project, in folder Plugin :
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class CInterface : MonoBehaviour {
[DllImport ("__Internal")] private static extern int _GetDeptCount();
}
and in your xCode project :
extern "C" {
int _GetDeptCount()
{
int nbDept;
nbDept = [oRefRead.department count];
return nbDept;
}
}
good luck.
hervé
Since U3 you don’t need pro anymore.
Plugins are available on both iOS licenses. (plugins remain pro on desktop though!)