Created
October 19, 2016 18:42
-
-
Save chamons/99a8b6ee46abc3218828adb31ae319f2 to your computer and use it in GitHub Desktop.
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
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