Skip to content

Instantly share code, notes, and snippets.

@kimsama
Last active December 16, 2015 02:19
Show Gist options
  • Save kimsama/5361913 to your computer and use it in GitHub Desktop.
Save kimsama/5361913 to your computer and use it in GitHub Desktop.
Unity3D plugin usage for csharp. Original gist for Unity javascript can be found on https://gist.github.com/keijiro/1241999
import System.Runtime.InteropServices;
#if UNITY_IPHONE && !UNITY_EDITOR
[DllImport ("__Internal")] static extern private void _PluginFoo(int arg);
#else
static private void _PluginFoo(int arg) {
// iOS以外での代替処理。
}
#endif
public static void Foo(int arg) {
_PluginFoo(arg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment