Unity: Pass texture pointer from OpenGL to Unity I'm working on a scene in Unity where I have textures loaded at runtime. As a result of that, the scene is being slowed down (even with co-routines), so I thought maybe I could move the texture loading task to a plugin and have it run as a parallel thread..

Is there a way to load a texture with OpenGL in a Unity native plugin, and return a pointer back to the scene for further use?
I am not sure if doing this is right or wrong or actually needed in practice. However, I was curious once &amp; wanted to learn about Unity Native plugins, so i decided to do exactly what you need. 

Basically, I wrote a native plugin, which loads image data using C++ &amp; stb_image library, it then passes byte[] to Unity C# side where it gets applied on a quad. There are many things you need to consider if it's a cross platform app, I was able to run it on both PC &amp; Android during the experiment. 

Let me know if this is what you want to achieve &amp; I can pass on the code to you. 

Best.