Question by
email2jie · Jul 16, 2018 at 05:52 PM ·
native plugin
Native Plugin Texture2d rendering fails in build
Hey peeps, I am playing with native plugin texture2d manipulation where I attach a texture2d to a quad's material and then pass the texture2d's ptr to a DLL. Similar to this doc https://docs.unity3d.com/Manual/NativePluginInterface.html. Then I pass the image from my webcam to my DLL as well and update the texture2d with my GPU. This works in the editor but I have no idea why the image data seems to break in the build.
Working in editor: Failing in build:
Comment
Best Answer
Answer by email2jie · Jul 16, 2018 at 08:37 PM
Problem solved... I don't know why but Unity or Windows caches DLL... and didn't use the latest DLL for some reason. So my picture was lacking a channel. Delete build and dll in your folder then rebuild to fix the problem.
Your answer
![](https://koobas.hobune.stream/wayback/20220612170834im_/https://answers.unity.com/themes/thub/images/avi.jpg)