Skip to content

Instantly share code, notes, and snippets.

@chamons
Created October 19, 2016 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chamons/99a8b6ee46abc3218828adb31ae319f2 to your computer and use it in GitHub Desktop.
Save chamons/99a8b6ee46abc3218828adb31ae319f2 to your computer and use it in GitHub Desktop.
public static class SCNMaterialPropertyPatch
{
[System.Runtime.InteropServices.DllImport ("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
public extern static void void_objc_msgSend_IntPtr (IntPtr receiver, IntPtr selector, IntPtr arg1);
public static void SetContentColor (this SCNMaterialProperty materialProperty, CGColor c)
{
void_objc_msgSend_IntPtr (materialProperty.Handle, ObjCRuntime.Selector.GetHandle ("setContents:"), c.Handle);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment