Created
February 14, 2014 15:28
Revisions
-
KevinJones created this gist
Feb 14, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ // a global function; no need to expose this in a header file void internalDoSomething() { // put your function here. } // note that if you were using C++ or Objective-C++ you'd need to put this in an extern closure, like so: extern "C" { void internalDoSomething() { // ... } } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ // In a Unity C# class: public class MyCFunction { public static void DoSoemthing() { internalDoSomething(); } [DllImport ("__Internal")] private static extern void internalDoSomething(); }