@@ -62,8 +62,8 @@ public bool OnRender(double deltaTime)
6262 {
6363 if ( _renderTexture == null )
6464 {
65- // _texture = new Texture(_overlayHandle);
66- _renderTexture = new RenderTexture ( 1024 , 1024 ) ;
65+ // Create GL texture
66+ _renderTexture = new RenderTexture ( _data ? . OverlayWidth ?? 1024 , _data ? . OverlayHeight ?? 1024 ) ;
6767
6868 // Create SteamVR texture
6969 _vrTexture = new Texture_t
@@ -238,7 +238,7 @@ private void Worker() {
238238 OpenVR . Overlay . SetOverlayFlag ( _overlayHandle , VROverlayFlags . SendVRDiscreteScrollEvents , properties . Input ? . DiscreteScroll == true ) ;
239239 OpenVR . Overlay . SetOverlayFlag ( _overlayHandle , VROverlayFlags . SendVRSmoothScrollEvents , properties . Input ? . SmoothScroll == true ) ;
240240 OpenVR . Overlay . SetOverlayFlag ( _overlayHandle , VROverlayFlags . SendVRTouchpadEvents , properties . Input ? . Touchpad == true ) ;
241- OpenVR . Overlay . SetOverlayFlag ( _overlayHandle , VROverlayFlags . MakeOverlaysInteractiveIfVisible , _isUsingInput ) ;
241+ OpenVR . Overlay . SetOverlayFlag ( _overlayHandle , VROverlayFlags . MakeOverlaysInteractiveIfVisible , properties . Input ? . AlwaysActive == true ) ;
242242 OpenVR . Overlay . SetOverlayFlag ( _overlayHandle , VROverlayFlags . VisibleInDashboard , false ) ;
243243
244244 // Set anchor
@@ -537,7 +537,9 @@ public void ProvideNewData(string sessionId, InputDataOverlay? data, string? non
537537 _nonce = nonce ;
538538 }
539539
540- public void Shutdown ( ) {
540+ public void Shutdown ( )
541+ {
542+ OpenVR . Overlay . ClearOverlayTexture ( _overlayHandle ) ;
541543 _requestForNewData = null ;
542544 _responseAtCompletion = null ;
543545 _responseAtError = null ;
0 commit comments