-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugs of ResolveToRenderTexture.cs #1363
Comments
Thanks for reporting this. We should have a fix in place in the next release. |
Version 2.6.6 is now out. Please let us know if this has not resolved your issue. |
@Chris-RH It looks like when the MediaPlayer is changed by setter, the material also need to be re-created, that I haven't look deep into the reason why the material has been set to null at some time. And I try to fix it by myself in the way that, I have copied these three lines in If there is anything wrong, please let me know :)
|
Also need to add some Null check. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue as it appears to have been fixed some time ago. Please create a new issue if this is not the case. |
Hi,
I'm using the newest version(v2.6.5) of AVPro and just found that, there is a bug in this
ResolveToRenderTexture.cs
script.In Line30, the variant
_mediaPlayer
should be replaced by 'value'.public MediaPlayer MediaPlayer { get { return _mediaPlayer; } set { ChangeMediaPlayer(_mediaPlayer); } }
However, after i correct the code in my project and I found that another error comes:
NullReferenceException: Object reference not set to an instance of an object
RenderHeads.Media.AVProVideo.VideoRender.SetupVerticalFlipMaterial (UnityEngine.Material material, System.Boolean flip) (at Assets/BasicAbilities/Framework/AVProVideo/Runtime/Scripts/Internal/Utils/VideoRender.cs:317)
RenderHeads.Media.AVProVideo.VideoRender.SetupMaterial (UnityEngine.Material material, System.Boolean flipVertically, System.Boolean playerSupportsLinear, UnityEngine.Matrix4x4 ycbcrTransform, UnityEngine.Texture ycbcrTexture, System.Single[] textureTransform, RenderHeads.Media.AVProVideo.VideoMapping mapping, RenderHeads.Media.AVProVideo.StereoPacking stereoPacking, RenderHeads.Media.AVProVideo.AlphaPacking alphaPacking) (at Assets/BasicAbilities/Framework/AVProVideo/Runtime/Scripts/Internal/Utils/VideoRender.cs:383)
RenderHeads.Media.AVProVideo.VideoRender.SetupMaterialForMedia (UnityEngine.Material material, RenderHeads.Media.AVProVideo.MediaPlayer mediaPlayer, System.Int32 texturePropId, UnityEngine.Texture fallbackTexture, System.Boolean forceFallbackTexture) (at Assets/BasicAbilities/Framework/AVProVideo/Runtime/Scripts/Internal/Utils/VideoRender.cs:360)
RenderHeads.Media.AVProVideo.ResolveToRenderTexture.Resolve () (at Assets/BasicAbilities/Framework/AVProVideo/Runtime/Scripts/Components/ResolveToRenderTexture.cs:99)
RenderHeads.Media.AVProVideo.ResolveToRenderTexture.ChangeMediaPlayer (RenderHeads.Media.AVProVideo.MediaPlayer mediaPlayer) (at Assets/BasicAbilities/Framework/AVProVideo/Runtime/Scripts/Components/ResolveToRenderTexture.cs:67)
RenderHeads.Media.AVProVideo.ResolveToRenderTexture.set_MediaPlayer (RenderHeads.Media.AVProVideo.MediaPlayer value) (at Assets/BasicAbilities/Framework/AVProVideo/Runtime/Scripts/Components/ResolveToRenderTexture.cs:30)
In my project, i want to link the output texture of AVPro to another new RenderTexture. So it would be much apperaicate if one of the developers can help~
The text was updated successfully, but these errors were encountered: