Skip to content

Instantly share code, notes, and snippets.

@vanessaaleung
Last active May 28, 2019 11:46
Show Gist options
  • Save vanessaaleung/23a3b5c77e12524855d9827ad425e5ba to your computer and use it in GitHub Desktop.
Save vanessaaleung/23a3b5c77e12524855d9827ad425e5ba to your computer and use it in GitHub Desktop.
DllImport
public class SimpleCloudHandler : MonoBehaviour, ICloudRecoEventHandler
{
[System.Runtime.InteropServices.DllImport("__Internal")]
//Declare the function you want to call in iOS
//e.g. I declare the `unityToIOS` function which I use to pass string to iOS
private static extern void unityToIOS (string str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment