【发布时间】:2019-09-24 10:51:41
【问题描述】:
设置:
我正在使用nativ render plugin 在纹理上显示 webcontant 并且不会使主线程过载。 Unity 端将纹理传递给插件,代码每帧都会更改它的像素。这是通过使用 Texture.GetNativeTexturePtr:
private void CreateTextureAndPassToPlugin()
{
// Create a texture
Texture2D tex = new Texture2D(1280, 720);
tex.filterMode = FilterMode.Point;
// Call Apply() so it's actually uploaded to the GPU
tex.Apply();
// Set texture onto material
GetComponent<Renderer>().material.mainTexture = tex;
// Pass texture pointer to the plugin
SetTextureFromUnity (connID, tex.GetNativeTexturePtr(), tex.width, tex.height);
}
我根据 Microsoft 的指南设置了整个旁观者视图。我可以用我的 HoloLens 做一些事情,第二个人可以通过安卓设备看到我的交互。问题是观众无法在 Android 设备上看到我的纹理/网络内容。
我想要什么:
sb 是否知道如何告诉 unity 纹理已更改并需要更新?我在这方面的知识非常有限。据我了解,问题似乎出在观众身上,而观众并没有提供解决问题的方法。
我的规格:
Unity 2019.2.0f1
视觉工作室 2017
原生插件:UnityBitbucketGithub
【问题讨论】:
标签: c# unity3d augmented-reality hololens mrtk