ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.11k stars 1.28k forks source link

UnassignedReferenceException when add handle texture #1218

Open dpggit opened 5 years ago

dpggit commented 5 years ago

I use this code trying to make appear a texture in openvr using Unity but i get the UnassignedReferenceException when try to add the handle texture, but the texture is well asigned and has a value

var overlay = OpenVR.Overlay; if (overlay != null) { var texture = new Texture_t(); texture.handle = handletexture.GetNativeTexturePtr(); texture.eType = SteamVR.instance.textureType; texture.eColorSpace = EColorSpace.Auto; overlay.SetOverlayTexture(progressBarOverlayHandle, ref texture); }

dpggit commented 5 years ago

Got to solve the UnassignedReferenceException but SetOverlayTexture doesnt draw any image, how can i draw an image using OpenVR?