Skip to content
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

KlakSpout fails to update Unity texture on sender start/stop/restart - Unity 2021.2.0b4 #73

Closed
MrMahgu opened this issue Jul 20, 2021 · 7 comments
Assignees
Labels

Comments

@MrMahgu
Copy link

MrMahgu commented Jul 20, 2021

When restarting a spout sender (In my case, non KlakSpout sender) unity fails to pickup that the sender has restarted sending and no texture updates will happen unless the Receiver in Unity is enabled/disabled/restarted.

KlakSpout V1 continued to received the new sender texture without issue.

Steps to reproduce:
Unity 2021.2.0b4 -> New Project
Add scoped registries
Install KlakSpout 2.0.2
Add Plane
Add Spout Receiver to Plane
Configure With Plane _MainTex
Play
Start sender
Wait..1..Wait..2
Stop sender
Wait..1..Wait..2
Start sender

texture is not updated with new sender texture

Windows 10, x64.

@keijiro keijiro self-assigned this Jul 21, 2021
@keijiro
Copy link
Owner

keijiro commented Jul 21, 2021

Thanks for reporting the issue. Does it reproduce with SpoutSender.exe? https://github.com/leadedge/Spout2/tree/master/DEMO

@MrMahgu
Copy link
Author

MrMahgu commented Jul 21, 2021

Yes. With SpoutSender.exe it still does not update texture if SpoutSender.exe is closed and re-opened and re-configured.

@keijiro
Copy link
Owner

keijiro commented Jul 21, 2021

Thanks for the information. I'll try reproducing it.

keijiro added a commit that referenced this issue Aug 2, 2021
This is a fix for issue #73.
@keijiro
Copy link
Owner

keijiro commented Aug 2, 2021

Fixed in 2.0.3.

@keijiro
Copy link
Owner

keijiro commented Aug 2, 2021

I'm closing this issue now. Please feel free to reopen it if it still reproduces.

@keijiro keijiro closed this as completed Aug 2, 2021
@MrMahgu
Copy link
Author

MrMahgu commented Aug 6, 2021

In KlakSpout v1 - the last received frame was left active on the texture
In KlakSpout v2 - the last received frame is discarded and removed

Which is desired for future?

@keijiro
Copy link
Owner

keijiro commented Aug 7, 2021

In KlakSpout v2 - the last received frame is discarded and removed

The spout receiver and its texture are internally removed, but Receiver.receivedTexture (backed by Receiver._buffer) remains intact until reconnection.

So, from a user's perspective, the last received frame is left active on the texture.

If you find a behavior that removes the last received frame on disconnection, please submit a bug report. That's not my intention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants