Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"[DllImport("__Internal")]" - what does the "__Internal" mean?

I am working with unity for an iOS game. For unlocking achievement I need to access a "Achievement.mm" file from my c# code:

    [DllImport("__Internal")]
    private static extern void
       GKAchievement(string achievementID, float progress, bool value);

I got this code from a forum. But, what does the "__Internal" means ?

like image 717
zamiurratul Avatar asked Jul 26 '16 08:07

zamiurratul


1 Answers

  • Plugins link their code to C# unity using [DllImport()].
  • __internal is a keyword used for static linking needed by specific platforms, such as XBox and iOS.
  • Other platforms usually use dynamic linking, hence this is not needed.

Please for more info refer to: https://docs.unity3d.com/Manual/NativePlugins.html

like image 138
Razzlez Avatar answered Sep 21 '22 16:09

Razzlez