Last active
December 16, 2015 02:19
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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