- Home /
In a native iOS App, how to send a message from Unity to iOS ?
Hi,
I'm actually using a Unity game inside an iOS application. I want the Unity game to send message to my iOS app in order to have a game which will be played on two different levels : Unity & iOS. How can I do this ?
I think I have to use some hooks, but I absolutly don't know how to use them or set them. A link to a tutorial or an explanation would be perfect.
Thx in advance
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by yelman · Jan 06, 2016 at 04:53 PM
Create a new class and add the following declaration:
     [DllImport ("__Internal")] private static extern void _ObjCMethodName();
Than add another method to the same class which should be called from Unity when you want to use your native functionality:
     public string ObjCMethodName()
     {
         return _ObjCMethodName();
     }
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                