Created
September 26, 2011 10:40
-
-
Save keijiro/1241999 to your computer and use it in GitHub Desktop.
(Unity for iOS) Native plugin import in JavaScript
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 | |
@DllImportAttribute("__Internal") static private function _PluginFoo(arg : int) {} | |
#else | |
static private function _PluginFoo(arg : int) { | |
// iOS以外での代替処理。 | |
} | |
#endif | |
static function Foo(arg : int) { | |
_PluginFoo(arg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment