Skip to content

Instantly share code, notes, and snippets.

@KevinJones
Created February 14, 2014 15:28
Show Gist options
  • Save KevinJones/9002973 to your computer and use it in GitHub Desktop.
Save KevinJones/9002973 to your computer and use it in GitHub Desktop.
// 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()
{
// ...
}
}
// In a Unity C# class:
public class MyCFunction {
public static void DoSoemthing() {
internalDoSomething();
}
[DllImport ("__Internal")]
private static extern void internalDoSomething();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment