Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Runtime.InteropServices;
  3.  
  4. public class HogeClass {
  5. [DllImport("__Internal")] // Unityで提供されているネイティブプラグイン
  6. private static extern void hogeMethod_ (); // ネイティブコード上のメソッド
  7.  
  8. public static void hogeMethod () {
  9. if (Application.platform != RuntimePlatform.OSXEditor) {
  10. hogeMethod_ (); // ネイティブコード上のメソッドを呼び出す
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement